Facebook App dev vol.9 : Debugging cross-browser security issues

Note from : Building Facebook Applications with HTML and JavaScript Ch.4 – 5

Sometimes an issue that happens when start calling in feeds and other data from external sites.

Open your Facebook page with Chrome browser > Right click then “Inspect Element” > You will see lots of warnings

*Warnings are all related to insecure content coming in from somewhere else. Essentially from our Google Feed, the problem is that Facebook requires you to use an SSL certificate on your site. And that allows the transfer of information between your app and Facebook to be more secure. But it means that we have to be careful when we code the pages or when we import code from other places.

When working on a site with the SSL certificate on, if you link the data with a regular http://, you will see warnings. It’s not gonna be a fatal problem in a lot of browsers, but you should fix it in a good practice.

Solution. 1 ->
Modify the code from Google and use “https” links. Change all http:// to https://. This will give much less warnings.

Solution. 2 ->
Add
the placeholder for your blog content

var entriesThumbnail=’https://i.ytimg.com/vi/’ + entriesID + ‘/1.jpg’;

to the function “populatedVideos”, right under the code “var entriesThumbnail=entries[i].media$group.media$thumbnail[1].url;”

Reload the app page. I can see now all warnings are gone!

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s