Search code examples
androidandroid-emulatorcommandandroid-2.2-froyofacebook-android-sdk

How to create the signature Hash code for integrating facebook in an android Application?


I am using facebook integration in to my application. But i got stop at get Hash code of the Android application. Link to get Hash code for facebook: Here.

I am using this syntex in commend prompt but got error like keytool is not recognized as an internal or external command:

D:\Users\Priyadarshan\.android>keytool -exportcert -alias androiddebugkey -keyst
ore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
'keytool' is not recognized as an internal or external command,
operable program or batch file.

Please help me in this. Thanks.

Edited:

After seen that :This Link.

I have Done like below but still got error:

D:\Users\Priyadarshan>cd C:\Program Files\Java\jre7\bin\keytool -exportcert -ali
as androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary |
openssl base64
'openssl' is not recognized as an internal or external command,
operable program or batch file.

After Some guide I have done like below but still got error:

D:\Users\Priyadarshan>cd C:\Program Files\Java\jre7\bin\keytool -exportcert -ali
as androiddebugkey -keystore ~/.android/debug.keystore | D:\Users\Priyadarshan\o
penssl-0.9.8k_WIN32\bin\openssl sha1 -binary | D:\Users\Priyadarshan\openssl-0.9
.8k_WIN32\bin\openssl base64
The system cannot find the path specified.
2jmj7l5rSw0yVb/vlWAYkK/YBwk=

Solution

  • I have keytool in a different directory:

    C:\Program Files (x86)\Java\jre6\bin

    You can either add the path where keytool is into your PATH environment variable, or you can use quotes around the full path like

    D:\Users\Priyadarshan.android>"C:\Program Files\etc\keytool.exe" -exportcert etc etc

    Don't forget the quotation marks because of spaces in the path!