Facebook: Invalid Hash Key

#1

Hey there,

I get an invalid Hash key error when I try logging into Facebook, once the app is deployed into the play store. It works fine on Expo, and the apk runs when dropped into my emulator device. I followed the instructions, by running that keytool command, but nothing seems to be working…

Any advice or help would be greatly appreciated

#2

https://stackoverflow.com/q/20301025/449058 <-- is this related?

#3

Unfortunately that didn’t work. After trying multiple things, what I ultimately ended up doing was making a new Expo app and copied all my files too it. That did the trick

#4

Ever figure this out lol still having this issue.

#5

Every new app release needs a hash to be updated at the facebook developers page:

https://docs.expo.io/versions/latest/sdk/facebook#run-keytool--list--printcert--jarfile-your_apkapk-

The hash for the expo client is different than the standalone app. You should run:
keytool -list -printcert -jarfile YOUR_APK.apk | grep SHA1 | awk ‘{ print $2 }’ | xxd -r -p | openssl base64

Hope it helps.