I am getting this error. When I try to sign in with facebook to my app. When I first time authentication it will correctly working. After I unistalled my application and now
Remove app from user settings in Facebook (account).
Uninstall the app.
Get the new hash using the release or new debug keystore. Use this command:
keytool -exportcert -alias <RELEASE_KEY_ALIAS> -keystore <RELEASE_KEY_PATH> | openssl sha1 -binary | openssl base64
Add the new hash on Facebook dashboard.
ANSWER
Just throwing this out there for people still experiencing this issue. The hash I created through the keytool was somehow incorrect. I fixed it by doing the following:
If you already uploaded your app to the playstore and enabled "app signing by Google Play" there is a solution (at least this worked for me):
That should fix the issue.
UPDATE
The steps above should still fully work.
But if you do not want to paste your key on that website, here is an alternative to step 6,7,8 below:
here's a oneliner Node.js command to do the same:
node -e 'console.log(Buffer.from(process.argv[1].split(":").map(hex => parseInt(hex, 16))).toString("base64"))' '5E:8F:16:06:2E:A3:CD:2C:4A:0D:54:78:76:BA:A6:F3:8C:AB:F6:25'
credits: mifi
UPDATE - NOV 2020
Google released a new Play Console. From now on you can find App signing key certificate here:
The issue for me (at the time of writing this) was when adding hash directly in Facebook Login -> Settings page. For some strange reason it does not save it correctly.
I fixed this with going to Quickstart and adding hashes in one of the steps and hitting Save. (fix will probably be obsolete when they fix their web page)
I did not have an issue with the tool, it generated correct hash. People with wrong Play store hashes probably have Play store signing enabled or entered wrong credentials.
FnnK.jpg
solutions are -------------- Set LoginBehavior if you have installed facebook app in your phone loginButton.setLoginBehavior(LoginBehavior.WEB_ONLY);
I resolved the same issue by replacing the key hash,
How to generate the key hash for release. Open Chrome browser console to convert a hex map key to base64
Copy SHA1 key from google play console.
> btoa('a1:43:d4:27:c8:04:rr:fr:2g:3b:tg:b5:et:c1:4a:1t:fr:f5:54:5f'.split(':').map(hc => String.fromCharCode(parseInt(hc, 16))).join(''))
< "g5fGIBgB6noFO9ur78BdEr73KG6="
I was facing the same issue. I had my keyhashes defined perfectly, was still facing the same issue. I was not able to login even for the first time.
Solution to my problem was:
Go to your app's dashboard here
On the left pane, under products tab, ensure that you have Facebook Login added. If not, add it there.
If all your other configurations are in place. It works perfect after that.