Since FB is not available in loginWithFacebookSDK on ReactNative, I use the Facebook React Native SDK (https://developers.facebook.com/docs/react-native) to sign in successfully to Facebook. I then tried to call the _sendSocialLoginRequest directly with my response from the Facebook authentication.
But all I get is a {message: “Could not approve social account.”, statusCode: 400}
I have successfully sign in with easyLogin on iOS before and I have successfully login with the Javascript loginWithFacebookSDK on a test website so I believe that my settings in Backendless are correct. But when I try to login with my React Native app running on Android I only get the "Could not approve social account when trying to login (using below method).
To test the _sendSocialLoginRequest directly I added a method to backendless.js
loginWithFacebookResponse: function(response, fieldsMapping, stayLoggedIn, async) {
if (stayLoggedIn instanceof Async) {
async = stayLoggedIn;
stayLoggedIn = false;
}
var socialType = "facebook";
var me = this;
me._sendSocialLoginRequest(me, response, "facebook", fieldsMapping, stayLoggedIn, async);
},
The response i’m passing in looks like this:
{
"accessToken":"EAAMwvBghWzQBAK8GEopwDbZA7ZBvKmM78hew9QPF9QK4dLzOyzGCZCnu5KGKpA8yyKgvNVFzQzul1A2QfGn3LMSYwvP2tk8O9MXhzjYYIyCnZCydIRlAKF9ZCkwWIzEBaInHkqJrb1eMgTTTS3n0eSB8iE2SA76h3Uc0iEzf5HdovrJPuotgmpn1BWrRNBIByZAQUGudtmJwZDZD",
"permissions":["public_profile"],
"declinedPermissions":[],
"applicationID":"898009346956084",
"accessTokenSource":"WEB_VIEW",
"userID":"108658029627537",
"expirationTime":1486275991465,
"lastRefreshTime":1481091991465
}
Any chance I could get this to work with any tweaks to what I’m passing in here?
Do you have any plans to add the loginWithFacebookAccessToken method that is available on iOS native SDK to the Javascript SDK?