Why my FB app loops forever in IE?

北慕城南 提交于 2019-12-03 17:20:25

It's a problem with redirects. IE handles them differently.

You can solve that with a simple P3P policy HTTP header you can send:

P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"

In PHP, that would be:

header('P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"');

The reason is that IE needs P3P policies in place when using frames, since your application runs inside an iframe and its parent belongs to a different domain (this case Facebook.com), then cookies will not work (unless P3P policies are being set). And since cookies won't work, then you are probably looping with your redirects used to login to Facebook.

Solution: need to implement P3P header to tell the browser that cookies for your application inside iframe are OK for user privacy.

I noticed something else in your code. You don't need a comma after 'cookie'=>true. That will mess things up in IE.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!