I have created two Facebook canvas apps. I am having problems with people accessing the apps. In the app settings you must enter:
Canvas URL Secure Canvas URL
Secure Canvas URL wont accept HTTP links but only HTTPS. When some of my users go to my app link like http://apps.facebook.com/my_app Facebook automatically redirects them to https://...
Canvas app content is loaded from my server which is only accessible via HTTP. The users which are redirected to https://apps.facebook.com/my_app then can not load my app since Facebook canvas wants to load content from my server via HTTPS. How do I solve this, without enabling SSL on mu server?
And not all users are redirected to https://apps.fa...? How is this handled?
The Canvas is quite literally a blank canvas within Facebook on which to run your app. You populate the Canvas by providing a Canvas URL that contains the HTML, JavaScript and CSS that make up your app. When a person using your app requests the Canvas Page, we load the Canvas URL within an iframe on that page.
If you have access to Facebook Canvas, you'll find it by going to your Facebook page and looking under Publishing Tools. You should see it at the bottom of your left sidebar menu. See if you have Canvas in your Facebook Page Publishing Tools.
In Facebook's words, Canvas is “a full-screen ad experience built for bringing brands and products to life on mobile.” It allows advertisers to deliver fully immersive, interactive ads that are hosted completely on Facebook — thereby eliminating the need for users to click out of the app to engage with mobile content.
Facebook Instant Experiences, formerly known as Canvas Ads, help you create beautiful, mobile experiences for your ads. Designed to capture your audience's attention, they load instantly and have proven to drive better business outcomes.
I have come up with an interesting hack for this problem.
You can create a HTML file that is accessible over HTTPS that just redirects to your webpage. For example, you can use dropbox. Since Facebook loads your secure canvas URL page in an iframe, your code needs to redirect the top page. Something like this.
<html>
<head>
<script>
function onLoad() {
window.top.location.href="<your website>";
}
</script>
</head>
<body onload="onLoad()">
<p>Please wait while you are being redirected to <your website name>…</p>
</body>
</html>
And provide this link as the secure canvas URL. I blogged about this in more detail - http://blog.almabase.com/post/84579042935/interesting-hack-for-facebook-secure-canvas-url
Basically, you must provide https support. At the moment, you can still leave the Secure Canvas URL field empty to avoid doing so, but it will be required starting October 1st.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With