I have an issue with my Facebook canvas iframe application.
I’m using sessions to build a simple questionnaire-style application. There’s a question on each page, when the form is submitted the answer is stored in a session array, and the page number is incremented by one, which then displays the next question. Simple stuff.
This app, however; works in every browser except Internet Explorer.
In Internet Explorer, on page change it appears to go through another page change which invalidates the session, and starts all over again. I’ve searched and searched, but can’t seem to find the cause of this behaviour.
I’ve placed the source code of the app at http://gist.github.com/613083. The app is using the standard PHP SDK provided by Facebook at http://www.github.com/facebook/php-sdk.
You might be experiencing a 3rd party cookie issue. If you are caught in a redirect loop this is probably the case.
Solution in php, add this:
This cleared it right up for me. I was having a nasty redirect issue.
This allows cross domain cookies to work for the page, as the cookie is being set for Facebook by your iFrame IE has to be told it’s ok.