Facebook playable ads with phaser - node.js

I am trying to make Facebook playable ad using Phaser3.60 but the problem is that Facebook block XMLHttpRequest which is used internally in phaser load to load images and sounds.
do do any one know a way to images to phaser without using its loader and without using XMLHttpResquest.
I tried to use imageLoadType: "HTMLImageElement" but it also gives me the same error, I dont know if facebook detect the XMLHttpRequest in the Phaser.min or in the game code.

I'm not sure if this is the solution for your specific problem, but after some tinkering, I learn abit about facebooks playable ads.
Disclaimer: First of all, I was not able the get the zip version to run.(not on the preview Tool and not even on a real campain)
With a single file index.html, with all the data inlined (just under the 2MB limit), I can upload the application and get the same Warning,
BUT after I click the Application (what executes FbPlayableAd.onCTAClick(), as mentioned in the yellow highlighted part), then the Done Button is activated, and I can deploy the ad.
I hope this helps.

Related

Removed Thirtdparty webvitals issue

I checked the pageinsights of "http://www.briddles.com/riddle/9-bodmas?l=333"
Most of these are thirdparty. How can i sove it ?
I see 3 important groups there:
Youtube
Google Ads or analytics
Facebook
Here is what I would do:
I see the youtube player is hidden by default, I would reserve some space for the player (maybe with a lightweight placeholder) and only append the iframe when the user clicks "view answer". This lite-youtube web component is awesome and might help you out. Trust me.
Normally Google ads is not something you want to get rid of. I would just make sure to load these scripts with the async attribute at least.
For the facebook comments I imagine 3 approaches:
3.1. Render a placeholder with a button saying "See comments" or something like that and only fetch the scripts when the user press that button.
3.2. Use the Intersection Observer API so when comments section scroll into view, fetch de scripts and render. (You will have to reserve some space to avoid CLS).
3.3. Remove the comments section (if there is almost no usage) or use a different provider that is optimized for web vitals. I don't know which one, but it's still an option.
Extra recommendations:
The main image is too heavy for mobile users, try to use a responsive image, compress the image and choose a lighter format like webp for browsers that support it. More info about image optimization here.
Reduce the amount of fonts you use and, if possible, host it by yourself and use a CDN. Google fonts is practical but to host your fonts is better for performance.

CLR Browser + Google Hangouts

first post here so I hope I'm not breaking any rules.
So, the situation I'm faced with is a bit complicated. I'm basically trying to login into a hangouts call without having the ability to use the browser itself. I can only insert the URL. Why is that you may ask?
I'm trying to show a hangouts call on my twitch stream using a OBS plugin called CLR browser. This plugin only allows to rezise the window and add a URL from where it'll take information from. It's great for notifications but not so great for what I'm trying to do. But after investigating alot I came to the conclusion that I'm out of options.
I do know you can login to gmail by only using the url like here:
How do I login into Google Apps via a URL?
If, for example I have a hangouts link like this:
https://plus.google.com/hangouts/_/gruxore63cq34fwddtcwwe64raa
Can I add something at the end so it logs in automatically?
Thank you.
Hate to disappoint, but you cannot auto-login using a link. OBS does allow you to screen share a window, though, so you should be able to open your favorite web browser, enter the Hangout, then share the window.
Failing that, XSplit has very flexible screen/region-sharing abilities.
Here's a YouTube video demonstrating exactly how to do this in OBS, and the link is time-coded right to the good-stuff.

Flash player security settings

I am using twilo client in one of my apps and it is showing following popup when I click on call button
But I want to show the following pop up which is lot simpler and seems less cumbersome
Is there a way to control which pop up comes on the screen? I have read some documentation of adobe but their configuration files live in users computer which ofcourse can not be changed by a website.
Any help will be really appreciated
Yeah, those dialogs are native Flash Player dialogs. The request domain is drawn from the domain that the swf is loaded in, and it must be for security reasons. The only way around this is to have the request come from a swf which is loaded from a "friendlier" domain.
Sounds like something that Twilio would need to address, not you. Perhaps you can bug them on their forum or such?

UIWebView localStorage not working

I’m trying to write an app that uses localStorage in a UIWebView. I’ve tested my code in regular Safari on the desktop and it works perfectly. I’m not accessing localStorage with the web view itself, but the JS inside is accessing it.
Now, when I actually put my JS inside an UIWebView, localStorage stops working.
E.g. putting the following into JS
alert(localStorage)
doesn’t do anything. alerting window nicely alerts me the correct thing.
I tried it both on a iPad and in the simulator and it doesn’t seem to able to work anywhere. I don’t see any properties or anything I could tweak for the UIWebView that would make it either enabled or disabled.
Couldn’t find any tutorials either on the web that deal with my exact situation.
It seems the problem lies in the domain security policy. I was able to finally figure out what the error is, but not sure if my solution is even fixable with any simple way as I’m actually putting the whole HTML together from different NSStrings.
http://forrst.com/posts/Security_err_dom_exception_18_and_how_to_avoid-1Ge has one solution if you’re dealing with local files.

Why does google.com look different on blackberry & phonegap vs. blackberry & browser

I'm tyring to get phonegap up and running on blackberry storm (9530 simulator). I had been testing my webapp from withing BB's built in browser, and it was looking ok, but then it totally bit once I tried to look at the some code from within phonegap, even though I was pointing phonegap to the same url (I hadn't yet gotten to the point of running code locally on the device).
I tried a test case on google and got similiar results. see below. I suspect that I'm missing something basic here. I would have expect both images to be nearly identical.
Browser
http://www.eleganttechnologies.com/outside/ImgDeviceBB9530WebGoogle.jpg
Phonegap
http://www.eleganttechnologies.com/outside/ImgDeviceBB9530PgGoogle.jpg
[Update]
To shed some light on what is happening, I ran the browser and the embedded browser (phonegap) against the W3 mobile web acid test: http://www.w3.org/2008/06/mobile-test/
I definitely notice differences between the two, but I don't yet know the 'why' and the 'how-to-address'.
Acid via built-in browser
(source: eleganttechnologies.com)
BTW - I ran this earlier today and got a couple more green square than just now.
Acid via browser embedded into phonegap
http://www.eleganttechnologies.com/outside/ImgDeviceBb9530PgAcid.jpg
Disclaimer: I don't know anything about phonegap, but have a pretty good theory. By default the embedded browser control on BlackBerry uses an older version of the rendering engine than the BlackBerry browser itself does.
At the BlackBerry developer conference last year, a talk was given about this, and there's an undocumented option to use the newer rendering engine. \
The option ID is 17000 (yes, a magic number, which could change, use at your own risk etc), and should be set to true. Not sure how you'd pass this option through phonegap (I'm not familiar with the toolkit) but using the BlackBerry APIs it's something like:
BrowserContent content;
...
content.getRenderingOptions().setProperty(RenderingOptions.CORE_OPTIONS_GUID, 17000, true);
I don't know the specifics of the browsers you are using, but I do know that most of the big sites will detect your OS + browser combination to decide what HTML to show you.
If Google is seeing a different user agent, you might get a generic mobile version of the HTML instead os the Blackberry specific HTML you get for the built in browser.
If you have access to a web server, try hitting it with both browser setups and see if there is any difference in the log file. That might tell you something interesting.
As we can see in your Acid tests...
One browser (the built-in one) is reporting correctly as a BlackBerry9530, and the other (phonegap) is not presenting the user-agent ["Testing with ."].
In this case, Google is providing you with the default view of their homepage, whereas when you are reporting yourself as a BlackBerry device, you will get the BlackBerry specific rendering.
By the sounds of things, using phonegap is removing the default user-agent (most probably because it's not recognising your device). As phonegap is open-source, the best bet is to get in there, and debug it and find out what happens with the user-agent when the http requests leave the device and track it back from there.
Maybe one browser has capabilities that another one does not?
Hm. By looking at the screenshot I would say that the second page is probably missing some resources. It may be missing some images, scripts and the CSS files, which would explain different l&f. Knowing how Blackberry Browser Field API works, I would guess that the implementation that uses the BrowserField was not done correctly. Just my guess. In addition to that, when the browser field is initialized the caller needs to configure it properly by enabling the appropriate browser features - scripts, styles etc. Again, the API is done in a very weird way, I have gotten myself into this trap once. When setting the options, you cannot just create one mask (like CSS | WML | SCRIPT) and make one call. Options are numeric and, I believe, non-overlapping - but you still need to call the API for setting each option independently.
Also the way asynchronous loading of the resources for BrowserField takes time to understand.
Just my $0.02.

Resources