Iframe Facebook application and cookies [Internet Explorer]
Asked Answered
D

2

7

I have downloaded the IBM P3P editor, created files and uploaded them to my server. And cookies are still not recognized in Internet Explorer. I've checked the P3P validation tool and it seems to validate.

The application can be viewed here: apps.facebook.com/naplesnews and the iframe points to www.naplesnews.com/facebook/app/.

Again www.naplesnews.com/facebook/app/ seems to validate with no issues as well.

Any idea what I'm missing here?

Disenchant answered 2/12, 2009 at 19:36 Comment(0)
D
29

Sorry to hear that you had to give up. I'm not sure what your exact issue is, but generally all your need for IE to accept cross-browser cookies is a P3P policy header. I'm not sure about the IBM tool. All I do for my PHP apps is the following bit of code prior to any page output:

//required for IE in iframe FB environments if sessions are to work.
header('P3P:CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');

So far I haven't had any problems with it in IE6, 7 or 8. Are you sure your security levels aren't set too high? This should work on the default levels.

There's separate issues I've had with session cookie validation and the Facebook client libraries, but those are various woes dealing with the actual cookie content, and not whether the cookies can be set or not.

Damn answered 10/12, 2009 at 8:48 Comment(2)
The problem I was running into was that I don't have any control over the server itself. It's corporate run. I was trying to get the P3P header to be recognized via meta tags in the HTML document. The application seems to be working just fine with the work around I put in place, but I am going to be getting into another project soon that may need P3P. Thanks so much for your reply, I appreciate it!Disenchant
Where should we put the header() line? Just before the <html> tag? If yes, then, this doesn't work for me on IE7.Dissogeny
W
6

Just to add/enhance the above for those who read PHP as OMG! ;)... here's the META tag that you'd place into your somewhere so that IE will work. I used the meta tag, just to eliminate one more thing for PHP to do :)

<meta http-equiv="P3P" content='CP="IDC DSP COR CURa ADMa OUR IND PHY ONL COM STA"' />

Hope it helps someone else... in my case, I was using it in a facebook memory game app that everyone except IE'rs were able to view ;) but this fixed it...

Waspish answered 29/3, 2011 at 17:28 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.