It seems as though the solution cited here:
No longer works. I have attempted both that and reconfiguring my Facebook app by resetting the secret, reconfiguring Parse with my new app credentials, and resetting xCode for a new simulator environment and all have failed. I continue to get old authentication data when the following function is called:
//sign up into parse db
Parse.FacebookUtils.logIn(authData, {
success: (user) => {
if (user.existed()) {
// login: nothing to do
console.log('User Already Logged In');
that.setState({loadingCurrentUser: false});
that.props.navigator.immediatelyResetRouteStack([{ name: 'home'}]);
} else {
// signup: update user data, e.g. email
console.log('getting user additional information');
var data = user.get('authData').facebook;
var api = 'https://graph.facebook.com/v2.3/'+data.id+'?fields=name,email&access_token='+data.access_token;
var fetchProfile = new FBSDKGraphRequest((error, result) => {
if (error) {
// TODO: error
this.setState({loadingCurrentUser: false});
} else {
console.log(result);
var name = responseData.name;
var email = responseData.email;
// FIXME: https://github.com/ParsePlatform/ParseReact/issues/45
var userId = {
className: '_User',
objectId: user.id
};
ParseReact.Mutation.Set(userId, {
username: email,
email: email,
name: name
}).dispatch();
that.setState({loadingCurrentUser: false});
that.props.navigator.immediatelyResetRouteStack([{ name: 'onboarding'}]);
}
}, '/me?fields=name,email');
// FIXME https://github.com/facebook/react-native-fbsdk/issues/20
// fetchProfile.start();
FBSDKGraphRequestManager.batchRequests([fetchProfile], function() {}, 10)
}
},
error: (user, error) => {
console.log('Error', error);
console.log(user.token);
switch (error.code) {
case Parse.Error.INVALID_SESSION_TOKEN:
Parse.User.logOut().then(() => {
this.onFacebookLogin(token);
});
break;
default:
// TODO: error
}
that.setState({loadingCurrentUser: false});
that.setState({errorMessage: error.message});
}
});
I am not sure how to proceed. Any help with error 251 and the most recent version of React Native (iOS)?