Release apk Facebook hash key not same with generated one
Asked Answered
S

2

8

I am developing an Android app. In my app, I am integrating Facebook Login. My Facebook login working fine. But not working when I produce release apk and run that app and try to log in with Facebook.

  1. I generate release apk like below

enter image description here

enter image description here

  1. Then I generate keyhash using that jks file path.

  2. I got a hash key and then add it to the developer profile settings.

When I install and run that apk on my device and login using Facebook, it always shows error like below.

enter image description here

Facebook hash key misconfiguration. Actually all the steps I did was right. So what I tried is, I tried copy that hash key to developer settings and not working. I tried another way. I generated new release apk with new key (different jks file). Then I generated hash key for it and add it to developer settings. Then I run app on my phone and log in. It gives me same error. Besides, it shows the same error with same hash key even if I generated another release apk with different key. What is wrong?

Update

All the release apk can login to Facebook at first time. Then log in again. Above error shows. Uninstall the app and install again not working. But if I generate a release apk with different keystore, it works for the first time, then not working. Uninstall and reinstall not working as well. What is the possible error?

Sucker answered 9/11, 2016 at 17:3 Comment(2)
Please look to this link it may help you Facebook Login for Android App with release keyMartita
In my case it was actually problem with OpenSSL library for Windows 10.. check out this SO answer which solved my problem https://mcmap.net/q/21229/-facebook-login-for-android-app-with-release-keyInhabitant
B
6

I had this problem too... When you generate the hash key, you add your computer password, but you have to write android You will get the key hash that facebook is showing you.

So, add it on your app on developers.facebook.com

See it here how to do it: android facebook integration invalid key hash

Brachypterous answered 9/11, 2016 at 18:19 Comment(3)
Yes, the second link has solution I used. Other solutions may also be useful if similar issue occured.Sucker
Hi, I have release the build apk with release key store and I am installing that in my phone. I have tried with face book login in my app it's showing invalid hash key error. When I am adding that hash key in to my fb developer account it's working fine. I HAVE DOUBT ON IF THAT APK IS PUSH IN TO PLAY STORE IS FB LOGIN IS WORKING FINE OR ANY HASH KEY RELATED ISSUES WE ARE FACING?.Heteromerous
This is the correct answer. I was generating the hash key in the terminal using my pc's password, but when I wrote "android", the correct hash key was returned 💯Misesteem
S
0

Actually this error is awkward. It should not happen because I properly followed the steps of generating hash key. I tried generate hash key many times to solve this error. No matter how I tried, hash key is always different in the release apk. Before I developed an app using the same way, it was working fine and now up and running.

I solved the problem. Hash key is always different no matter how I generated. How I solved was just copy the hash key in the error message and add it to the Facebook developer app settings. That's it.

Sucker answered 10/11, 2016 at 4:53 Comment(1)
Hi, I have release the build apk with release key store and I am installing that in my phone. I have tried with face book login in my app it's showing invalid hash key error. When I am adding that hash key in to my fb developer account it's working fine. I HAVE DOUBT ON IF THAT APK IS PUSH IN TO PLAY STORE IS FB LOGIN IS WORKING FINE OR ANY HASH KEY RELATED ISSUES WE ARE FACING?.Heteromerous

© 2022 - 2024 — McMap. All rights reserved.