Question

I created a canvas facebook app. The app itself was made in html and consisted of multiple different pages, the first page linking to the next, and so on... (links were assembled as simple html a tags with target="_self")

Everything seemed to be working fine in FF, Safari, Chrome, but not when we were testing in IE. It seems that redirecting within an iframe works different in IE, and it showed in the url of the browser:

  • When testing in FF,..., the url of the startpage would be apps.facebook.com/our-namespace, and after linking to the next page, this url in the browser would always remain that same apps.facebook.com/our-namespace.

  • When testing in IE, the url of the startpage would also be apps.facebook.com/our-namespace, but as soon as you hit one of the links, the url in the browser would change to apps.facebook.com/our-namespage/the-page-we-re-linking-to.php, not taking the target="_self" into account. When clicking on a comparable link again, the app would redirect to the start screen...

I spent hours trying to find an answer, I saw that changin IE's security settings would make it work:

in IE: go to Tools --> Internet Options --> Security --> Internet Zone --> Custom Level --> Miscellaneous --> Launch programs and files in an IFRAME. and make sure it is set to enabled

But this is not an acceptable solution as IE is configure different by default.

Was it helpful?

Solution

I found the solution was (in php) to add the following line to your code:

<?
header("p3p: CP=\"ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV\"");
?>

Problem solved! This should be in the facebook developer docs!!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top