Open ghonche opened 2 years ago
@ghonche This may be only debug mode. Please try this: https://stackoverflow.com/questions/70506466/invalid-key-hash-facebook-login
@ghonche This may be only debug mode. Please try this: https://stackoverflow.com/questions/70506466/invalid-key-hash-facebook-login
No, I don't think it's related to key hash.
I got my release certificate fingerprint using this command:
keytool -list -v \ -alias <your-key-name> -keystore <path-to-production-keystore>
from this doc
And then generated key hash using this command:
echo <SHA1 fingerprint> | xxd -r -p | openssl base64
or this link.
Then I copied and pasted this Release Key Hash into Facebook Android settings.
Did you try to using singed apk?? Even if the key is correct, it will be useless if the apk file is not signed. Read the implementation if you need to. This plugin is just a wrapper for the Facebook login library.
Yeah I did sign the APK. Using Android Studio ----> Build menu ---> Generate Signed Bundle/APK... I believe the problem is not related to the wrapper plugin because as far as i know, same issue exists in ionic and react native Facebook plugins (issues here and here). By the way, I fixed this issue for myself by forcing facebook to login through web dialog. This stops the native Facebook app from interfering. It works for me. Take a look if you want: https://github.com/capacitor-community/facebook-login/pull/84
The difficulty with this problem is that the application I am releasing works fine on the actual device of android: https://play.google.com/store/apps/details?id=jp.rdlabo.tipsys
@ghonche Can I try Facebook login with this app? First, isolate whether the problem is with the plug-in or with the actual device.
Hi again. I tried Facebook login in your app. It worked fine. Of course it openes a web intent for facebook login. That's how I solved the bug for myself (pull request ). The problem accures when you have Facebook app installed and a native intent opens.
Hi, again, and sorry for late.
I found https://github.com/magus/react-native-facebook-login/issues/297#issuecomment-433816732 , and sign key is changed at bundle.
If use "Build bundle", check SHA-1 on Google Play Console.
Thanks.
Hi Masahiko, Thanks for following up this issue. As far as i know, sign key is changed only after android application is published. But this issue occurs no matter my app is published or not. Any how, I will take a second look at the sign key. regards
I have fixed this by clearing mobile app cache and data.
Describe the bug When I tried to login with facebook, this error occurred:
To Reproduce Steps to reproduce the behavior:
Expected behavior Login must complete successfully.
Screenshots
Smartphone:
Additional context Please consider that the bug happens when the Facebook application is installed. And it only exists on signed apk. It is also reported in react-native-facebook-login . Also note that i've already added key hash on facebook dashboard.