1

we have thic piece of code:

            checkStatus: function() {

            var self = this;

            FB.getLoginStatus(function(response) {
                if (response.status === 'connected') {

                    self.isPage = false;
                    dojo.publish('fb/loginStatus/connected', response.authResponse);

                    if (self.UserRecord === null) {

                        self.buildAll(response.authResponse);

                    } else if (self.UserRecord.user_fid !== response.authResponse.userID){

                        self.clearAll();
                        setTimeout(function(){ self.buildAll(); }, 100);
                    }

                } else {

                    if (response.status === 'not_authorized') {
                        dojo.publish('fb/loginStatus/logged', response);
                    } else {

                        dojo.publish('fb/loginStatus/notLogged', response);
                    }
                }
            },true);
        },

All work fine, till user enter our app logged as facebook page, Fb.getLoginStatus doesn't fire up it's callback.

And my question is, how to detect, or do something else to handle this case in application ?

Cheers, Paul

1 Answers1

0

I'm betting this is a bug. There was a similar issue with FB.getLoginStatus last year when user was in sandbox mode. Anyways, you can get a user to switch back to their normal user with :

FB.login(function(response) {
    // response handler
});

It will display a prompt that says "You are using Facebook as Different User" and ask you to switch back to standard user.

Another option is to display one of the facebook social widgets after a certain timeout (e.g. like button). Instead of displaying a like button, it comes up with a link that says "Switch back to Normal User to use this social widget."

Hope these suggestions help.

Andrew Dyster
  • 2,278
  • 19
  • 23