Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to generate Keyhash (Facebook) using the Keytool in android for W7 32bit

I tried to generate the Keyhash for integrating the Facebook in our app, but when i generated the keyhash through cmd prompt, it can't generate.

C:\Users\DON\.android>keytool -exportcert -alias androiddebugkey -keystore ~/.an
    droid/debug.keystore | openssl sha1 -binary | openssl base64

'keytool' is not recognized as an internal or external command, operable program or batch file.

and another command I use is:

C:\Program Files\Java\jdk1.6.0_20\bin>keytool -exportcert -alias 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.

What is the problem?

like image 691
Rishi Gautam Avatar asked Nov 19 '12 05:11

Rishi Gautam


1 Answers

Using this command first download this file http://code.google.com/p/openssl-for-windows/downloads/detail?name=openssl-0.9.8k_WIN32.zip . Then extract the file and run this command:

C:\Program Files\Java\jdk1.6.0_20\bin>keytool -export -alias myAlias -keystore C:\Users\DON\.android\myKeyStore | C:\openssl\bin\openssl sha1 -binary | C:\openssl\bin\openssl enc -a -xtIm30l*********=

DON is my system name and should be replaced with your system name.

like image 65
Rishi Gautam Avatar answered Sep 25 '22 19:09

Rishi Gautam