1

Repro Steps:
1. Configure and install everything as discussed in the plugin documentation. 2. Install and run the app on the android device and Login to the app using Facebook Login 3. View JSON output from the login e.g. user id, token etc 4. Delete the app 5. Rebuild the app and reinstall it 6. And invalid key hash error message shows up.

I even did a production build and deployed it on the device from an external store yet it is showing the same error.

techwestcoastsfosea
  • 686
  • 3
  • 10
  • 21
  • Possible duplicate of [android facebook integration invalid key hash](https://stackoverflow.com/questions/23674131/android-facebook-integration-invalid-key-hash) – AesSedai101 Nov 24 '17 at 07:34
  • If you rebuild the app and use a different signature, it is normal that the key hash has changed. You must verify that you use the same keystore. – e666 Nov 24 '17 at 09:18
  • @e666 - the signatures are the same. If I unauthorize access to the app from my personal facebook account and re-login it works fine. The issue occurs only when the app is deleted and re-installed. I know its an edge case (that someone deletes an app and re-installs it) but seems like facebook login api is looking for the hash key since the user was already authorized by the app. – techwestcoastsfosea Nov 24 '17 at 19:06
  • Do you have the same hash key for the 2 apk with this command line https://stackoverflow.com/a/29303831/2549619 ? – e666 Nov 26 '17 at 13:18
  • @e666 - really dumb question: Should I be declaring the token value before even attempting a login. I feel like I am missing something in the process. Because in this case, I am not storing a token remotely (at least yet). And if I were storing it locally then it would be deleted the minute I delete the app. Facebook seems to be dropping the token somewhere that it cannot find when the same APK is reinstalled. The key is same (production key) for the original as well as the new apk. – techwestcoastsfosea Nov 27 '17 at 00:08
  • It was a bad hash key issue. Had to update my keys and that worked. Thank you all for your help. – techwestcoastsfosea Nov 28 '17 at 07:54

1 Answers1

0

take the Hash key from the message and insert into platform facebook

Or Choban
  • 1,661
  • 1
  • 8
  • 9