First of all, I know this is a duplicate of other threads and questions, since yesterday I think I've read them all.
Now, I'm trying to login using facebook on a React Native app, for now I'm just running it on android. The very first time I tested it, it worked.
I have added the key that the phone is showing in the error to developer.facebook.com, I changed my app to live in there as well and I even trie the code that people pasted on the older posts:
try {
PackageInfo info = getPackageManager().getPackageInfo(
"com.blabla",
PackageManager.GET_SIGNATURES);
for (Signature signature : info.signatures) {
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(signature.toByteArray());
Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
}
} catch (NameNotFoundException e) {
} catch (NoSuchAlgorithmException e) {
}
This is the code I'm using for the login itself:
LoginManager.logInWithReadPermissions(['public_profile', 'email', 'user_likes']).then({
function(result) {
if (result.isCancelled) {
alert('Login was cancelled');
} else {
AccessToken.getCurrentAccessToken().then((accessTokenData) => {
const credential = firebase.auth.FacebookAuthProvider.credential(accessTokenData.accessToken);
firebase.auth().signInWithCredential(credential).then((result) =>{
alert('Inicio de sesión exitoso');
}, (error)=>{
console.log(error)
})
});
}
},
function(error) {
alert('Login failed with error: ' + error);
}
})
}
I'm getting this error:
At this point any help will be much appreciated, I'm quite desperate.
