Facebook form app inside iframe loses cookies for

2019-02-19 04:30发布

问题:

I have a facebook app built using iframe. It works ok on most modern browsers except Safari on Windows platform. On Safari windows platform, the cookies seem to get lost as a user move from initial form page to 2nd page with questions.

Here is the live link

http://on.fb.me/1hCfgOX

Can someone help me on how to fix this?

回答1:

Ok, i found a fix for it which works perfectly. Checkout the following links:

Safari 3rd party cookie iframe trick no longer working?

Facebook Iframe App with multiple pages in Safari Session Variables not persisting

And

http://lightyearsoftware.com/2009/11/on-the-pain-of-developing-for-facebook/

I hope this will fix your issue also, as it fixed mine. If you got any problem, let me know.

Thank you



回答2:

besides header, you might also need to add w3c/p3p.xml and w3c/policy.p3p files to your website. See here for more details and sample files: Session null in IFrame in ASP.net MVC only in safari browser