FB.getLoginStatus is not triggerd in Safari 7.0.6

253 Views Asked by At

Debugging shows that FB object is available, in case of Safari 7.0.6 FB.init is triggered but FB.getLoginStatus is 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);

Console Returns

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?

0

There are 0 best solutions below