Nanfeng

Notes on software development, code, and curious ideas

Fixing Facebook Login “Invalid Key Hash”

Facebook Login returned invalid key hash; the key hash does not match any stored key hashes:

Invalid key hash

The hash registered in the Facebook developer console was incorrect. Copying the hash displayed in the error did not work for this app, probably because Google Play had re-signed the published APK.

Download the app-signing certificate from Google Play Console and calculate its Facebook key hash:

1
openssl dgst -sha1 -binary app-signing-certificate.der | openssl base64

Register the resulting value in the Facebook app settings.

+