1
votes

"Firstly, to generate your key hash on your local computer, run Java's keytool utility (which should be on your console's path) against the Android debug keystore. This is, by default, in your home .android directory)

On Windows, use:

keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%.android\debug.keystore | openssl sha1 -binary | openssl base64

You will be prompted for a password. This should be 'android' without quotes. You'll then be given a key hash of 30 characters or so. (If you are not prompted for a password, something is wrong and you must check your paths above to ensure the debug.keystore is present.)"

Here's my cmd: C:\Program Files (x86)\Java\sdk\platform-tools>keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%.android\debug.keystore | openssl sha1 -binary | openssl base64 slBznDHkLAsO3Vgw2i7c/gIppA0=

What am I doing wrong? the degug.keystore is present and the openssl is in the current dir also.

1

1 Answers

0
votes

You can run in java:

Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));

this sould print same the code as running keytool:

try to comare it to the code you got:

slBznDHkLAsO3Vgw2i7c/gIppA0=

Facebook graph have more solution to offer in: https://developers.facebook.com/docs/howtos/androidsdk/3.0/login-with-facebook/

under keytool errors