I kept getting a different Facebook key hash from the one being actually generated by my debug app when it runs. Turns out I’ve been entering the wrong keystore password.
To get your key hash for Facebook SDK on Ubuntu, run the following command:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
In case you don’t have the
keytool program yet, you’ll see the following message:
The program ‘keytool’ can be found in the following packages:
Try: sudo apt install
What I did was install
openjdk-9-jre-headless by running the command:
sudo apt install openjdk-9-jre-headless
Wait for your selected program to install and try the first command again to generate key hash for Facebook on Ubuntu.
When prompted for keystore password, try to use “android”.