在Safari 7.0.6中未触发FB.getLoginStatus

时间:2014-10-23 07:06:38

标签: facebook safari facebook-javascript-sdk safari7

调试显示FB对象可用,如果Safari 7.0.6 FB.init被触发但FB.getLoginStatus未被触发。

目前代码看起来像这样

FB.init({
     appId: 'app_id',
     xfbml: true,
     status: true,
     cookie: true,
     version: 'v2.1'
 });


FB.getLoginStatus(function (response) {
     if (response.status == 'connected') {
         onLogin(response);
     } else {
         FB.login(function (response) {
             onLogin(response);
         }, {scope: 'public_profile'});
     }
 }, true);

控制台返回

Blocked a frame with origin 'http://static.ak.facebook.com' from accessing a frame with origin 'http://example.com'. The frame requesting access set 'document.domain' to 'facebook.com' but the frame being accessed did not. Both must be set 'document.domain' to the same value to allow access.

任何猜测?

0 个答案:

没有答案
相关问题