-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
I should have written this one yesterday as the exact details have slipped my mind.
However, many responses should have a userID parameter, on iOS this is often an empty string "" on Android I have seen "null".
My fix is to store the accessToken in localStorage, whenever it changes I make a request to /me to get the users details, ie:
var dealWithStatusAndAuth = function(response){
if(tokenhaschanged){
FB.api('/me', {fields: 'id,first_name,last_name'}, bind(this, function(response){
// store the id and details for later use
}));
}
}
FB.Event.subscribe('auth.statusChange', bind(this, dealWithStatusAndAuth));
FB.Event.subscribe('auth.authResponseChanged', bind(this, dealWithStatusAndAuth));Reactions are currently unavailable