I am trying to implement login using Facebook. I have problem with hash keys. First of all I have installed OpenSSL into C:\OpenSSL\
On Windows 7, I run cmd as adminstrator. Went into jdk's bin folder:
cd C:\Program Files\Java\jdk1.7.0_45\bin
Try 1:
keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | "C:\OpenSSL\bin\openssl" sha1 -binary |"C:\OpenSSL\bin\openssl" base64
Entered password: android
Result: 1234567890ab (12 character). But documentation says :
This command should generate a 28 characher string. Copy and paste this Release Key Hash into your Facebook App ID's Android settings.
Try 2:
keytool -exportcert -alias androiddebugkey -keystore "C:\Documents and Settings\Administrator.android\debug.keystore" | "C:\OpenSSL\bin\openssl" sha1 -binary |"C:\OpenSSL\bin\openssl" base64
Password: not asking password
Result: 1234567890abcdefghijklmnopqr (28 character string). I have entered this into app page on Facebook developers. Logged into account successessfully. It is getting my name from Facebook. Logged out, tried to log into again. Getting this error on mobile device:
Invalid key hash. The key hash 0987654321abcdefghijklmnopqr (28 character string different from I generated) does not match any stored key hashes. Configure your app key hashes at http://developers.facebook.com/apps/1234567890123456
Try 3:
Followed this solution: https://stackoverflow.com/a/12405261/2255924
Result: I am getting something unreadable (abracadabra) but first character is similar to try 2's hash key.
What I am doing wrong? How to solve this problem?