Problem with session in Facebook application running in IE8

While building facebook applications using iframe you may have a problem with session persistance in IE8.

When you run the application in IE8, the session data is not persisted. But everything works fine in Firefox and Chrome.

This is a specific problem with pages inside iframe and Internet Explorer. Internet Explorer handle third party cookies the way the cookies are not transferred to the page inside iframe (when this page is located on a different domain).

 

Solution for PHP:

Add this header:

[codesyntax lang=”php”]

header('P3P: CP="CAO PSA OUR"');

[/codesyntax]

One thought on “Problem with session in Facebook application running in IE8”

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>