0

In my site I test if a user is logged on Facebook in order to suggest him/her to like my Facebook site page.

Then, I use the conventional Facebook Js SDK function to understand if the user is logged or not:

FB.getLoginStatus(function(response) {
    if (response.status === 'connected') {
        var accessToken = response.authResponse.accessToken;
        fbuid = response.authResponse.userID;
        status = 'connected';
    } else if (response.status === 'not_authorized') {
        fbuid = null;
        status = 'not_authorized';
    } else { // the user isn't logged in to Facebook.
        status = 'generic';
        fbuid = 1;
    }

    that.evaluateFbStatus(status, fbuid);
}

It works perfectly with every browsers except Firefox.

In Firefox it returns always unknown even if the user is logged on Facebook and the status is not_authorized or connected.

Any help is accepted.

Guern
  • 1,237
  • 1
  • 12
  • 30
  • possible duplicate of [FB.getLoginStatus always returns status='unknown'](http://stackoverflow.com/questions/9337619/fb-getloginstatus-always-returns-status-unknown) – marianosimone Feb 17 '15 at 17:47

1 Answers1

3

The problem is due to third party cookies.

To use Facebook SDK functions in Firefox, is necessary to open setting and able third party cookies Preferences > Privacy > Accept-third-party cookies

Have a look on this page for more details.

Guern
  • 1,237
  • 1
  • 12
  • 30