Facebook application does not work in Chrome, but good in Firefox

I just started creating Facebook apps using a hero. I made a test application. I uploaded a page on heroku that uses HTML5, CSS and Javascript. The app does not appear on Google Chrome https://apps.facebook.com/shrytestapp/ , but works well in Mozilla Firefox. In addition, the page works well when opening the heroku server http://salty-shelf-6707.herokuapp.com/ .

+4
source share
1 answer

When you access the application on Facebook, HTTPS is used to transfer data, but Chrome has blocked content transmitted over normal HTTP and insists that everything be securely transferred, while Firefox is not so fussy.

This displays the console in Chrome

[blocked] The page at https://salty-shelf-6707.herokuapp.com/ ran insecure content from http://www.google.com/jsapi. Uncaught ReferenceError: google is not defined 

The Google JS API is blocked and JavaScript does not work.

(You also have some obscure errors, but they are not related)

The application works great through http://salty-shelf-6707.herokuapp.com/ , as you mentioned, but not through https://salty-shelf-6707.herokuapp.com/

Try the following command instead:

 <script type="text/javascript" src="//www.google.com/jsapi"></script> 

// at the beginning of the value src will make a relative URL or for the correct technical term related to the scheme.

Paul Irish, lead developer of the HTML5 Boilerplate, has more information about this in a post on his website.

+5
source

All Articles