Future<UserCredential?> signInWithFacebook(BuildContext context) async {
my code
try {
log(“click”);
final LoginResult loginResult = await FacebookAuth.instance.login();
log(“ok”);
if (loginResult.status == LoginStatus.success) {
final OAuthCredential credential =
FacebookAuthProvider.credential(loginResult.accessToken!.token);
log("click2");
return await FirebaseAuth.instance.signInWithCredential(credential);
} else {
throw FirebaseAuthException(
code: 'Facebook Login Failed',
message: 'The Facebook login was not successful.',
);
}
} on FirebaseAuthException catch (e) {
// Handle Firebase authentication exceptions
log('Firebase Auth Exception: ${e.message}');
throw e;
} catch (e) {
// Handle other exceptions
log('Other Exception: $e');
throw e;
}
}
This is my code when I run this code it give me this error
Firebase Auth Exception: {“code”:190,”message”:”Invalid OAuth access token – Cannot parse access token”} [log] Error signing in with facebook:
Kindly help how we can solve this problem.
I try every solution.
I chacked every thing like appID and appSecret in both firebase console and facebook developer account.
Firebase Auth Exception: {“code”:190,”message”:”Invalid OAuth access token – Cannot parse access token”} [log] Error signing in with facebook:
Kindly help how we can solve this problem.
I try every solution.
I chacked every thing like appID and appSecret in both firebase console and facebook developer account.
Sajjad Ali is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.