Nakib Nakib - 1 year ago 103
PHP Question

Facebook App Canvas Showing Blank Page

i am trying to create facebook app but the canvas page is showing blank. I am working with localhost.

enter image description here

In my htdocs folder i have basic php file with following content

<title>Fb App</title>

In the console window i am getting following error

**[blocked] The page at '' was loaded over HTTPS, but ran insecure content from 'http://localhost/': this content should also be loaded over HTTPS.

**event.returnValue is deprecated. Please use the standard event.preventDefault() instead.**

I guess this means i need https. Do i really need https for testing on localhost

Answer Source

Since all your content is in Facebook's iframe, and it's a different domain, you need SSL.

You could go to your Facebook account settings and turn off "secure browsing" which allows you to use Facebook via pure http. I do not recommend this, as you might forget to turn it on later and not even know that stuff does not work for your users.

For testing you can build your own frame (to get proper page size, for example) and mock the Facebook's authentication in your code.

With real Facebook you would need install stuff on some server anyway because other things won't work properly. Facebook's servers cannot contact "localhost" to send you any data, for example.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download