Third party cookies and facebook app inside an iframe, getUser fails

I have this problem that is driving me crazy, I hope it will help also anybody that got to my point.

After reading a lot, apparently all the "hacks" of the past (including the p3p headers) do not work anymore on safari after the next update, so I rewrote everything to append a session id inside a GET, all is fine, apart that apparently without third party cookies facebook do not work anymore:

$user = $facebook->getUser();
        var_dump($user);

This returns the expected result with third party cookies activated, while returns int(0) without cookies activated, why?

Is there a workaround for this?

Thank you!


Turn off cookies in the FB.init / new Facebook class, and record the access token instead. (getAccessToken). Pass that to your iFrame and use setAccessToken to set it just after initiating the Facebook class.

链接地址: http://www.djcxy.com/p/57466.html

上一篇: 第三方会话cookie在iframe中丢失

下一篇: iframe中的第三方cookie和facebook应用程序,getUser失败