FB.getLoginStatus doesn't start in Safari 7.0.6

Debugging shows that the object FB

is available if triggered Safari 7.0.6

FB.init

, but FB.getLoginStatus

not.

Currently the code looks something like this:

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);

      

Returning the console

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.

Any guesses?

+3


source to share





All Articles