Why is the Facebook user ID matched by Firebase different from the Facebook ID associated with the same Facebook Graph account?

I have built-in Facebook authentication with Firebase to my site. I am using the Firebase JavaScript API.

The code I use is taken directly from the Firebase tutorial called User Login and Authentication, available here: https://www.firebase.com/docs/web/guide/user-auth.html

var myRef = new Firebase("https://#######.firebaseio.com");
var auth = new FirebaseSimpleLogin(myRef, function(error, user) {
    if (error) {
        // an error occurred while attempting login
        console.log(error);
    } else if (user) {
        // user authenticated with Firebase
        console.log("User ID: " + user.id + ", Provider: " + user.provider);
    } else {
        // user is logged out
    }
});
auth.login("facebook");

All this works perfectly, recording the correct information.

However, the identifier that is registered (i.e. the user identifier that appears in the data in the Firebase dashboard) is different from the Facebook identifier I get through the Facebook graph.

Firebase 17- . Facebook (https://developers.facebook.com/tools/explorer?method=GET&path=me%3Ffields%3Did%2Cname&version=v2.0) 9- .

, Firebase , Facebook Facebook. .

? Firebase Facebook, Facebook?

+4
2

Facebook 2.0 Open Graph. . , Facebook Facebook. , Facebook , , " ". , X, X. , API . , , Facebook, Firebase .

17- Simple Login, , , , Facebook , Facebook v2 ( ). Open Graph Explorer, v2. Simple Login v1 v2 , Facebook. , , API Open Open Graph , . v2 , Facebook, . v1, , Facebook 10 .

" " .

+3

providerData , Firebase .

0

All Articles