This is simple process to generate Hash key and we already create lots of time but again we forget that how to generate Hash key ? Even i am stupid one of them and again throw same query in Google. But Now i remember whole the process to generate hash key. When you start to create new Facebook application for android they ask Hash Key to validate your application.
Most of the time user confused to generate Hash key and Key Store , They confused that from where to start ? It mean which path should be use to generate key?
How to Generate android (Facebook ) Hash Key ?
Step 1 : Download OpenSSL for Windows
Step 2 : Open the drive where you have install JDK. ,(in my case that is C:\)
Step 3 : Extract your Open SSL zip here in root directory (in my case C:\Program Files\)
Step 4 : Copy : JAVA > JDK 1.7.0_25 > bin
Step 5 : Open Command prompt , Start > Run > CMD
Step 6 : Now CMD will show User's location (in my case C:\Users\chintan >_)
Step 7 : Using Step 4 paste that copied path here and enter ,
So it looks like this C:\Users\chintan > cd C:\Program Files\Java\jdk1.7.0_25\bin
Enter , so that will switch to new location. So now you should be here C:\Program Files\Java\jdk1.7.0_25\bin >_
Step 8 : Now start from here ,
Step 9 : Enter if you are ready to get Hash Key :)
Most of the time user confused to generate Hash key and Key Store , They confused that from where to start ? It mean which path should be use to generate key?
How to Generate android (Facebook ) Hash Key ?
Step 1 : Download OpenSSL for Windows
Step 2 : Open the drive where you have install JDK. ,(in my case that is C:\)
Step 3 : Extract your Open SSL zip here in root directory (in my case C:\Program Files\)
Step 4 : Copy : JAVA > JDK 1.7.0_25 > bin
Step 5 : Open Command prompt , Start > Run > CMD
Step 6 : Now CMD will show User's location (in my case C:\Users\chintan >_)
Step 7 : Using Step 4 paste that copied path here and enter ,
So it looks like this C:\Users\chintan > cd C:\Program Files\Java\jdk1.7.0_25\bin
Enter , so that will switch to new location. So now you should be here C:\Program Files\Java\jdk1.7.0_25\bin >_
Step 8 : Now start from here ,
8.1
keytool -export -alias myAlias (set alias name any)
8.2
C:\Users\chintan\.android\debug.keystore ,(Get your Debug key store path and append after alias )
8.3
C:\openssl-0.9.8k_WIN32\bin\openssl
sha1 -binary
(Get your openssl path and append after keystore path separate with "|") 8.3C:\openssl-0.9.8k_WIN32\bin\openssl enc -a -e (append with "|")
Step 9 : Enter if you are ready to get Hash Key :)
C:\Program Files\Java\jdk1.7.0_25\bin >keytool -export -alias myAlias -keystore C:\Users\chintan\.android\debug.keystore | C:\openssl-0.9.8k_WIN32\bin\openssl sha1 -binary | C:\openssl-0.9.8k_WIN32\bin\openssl enc -a -e
Thank you, thank u very much your article helped me a lot...
ReplyDelete.
Nearly after10 days, searching over the internet I found a correct method to get the fb key..
.
Thank u again
Thank you so much...You are the great person for me....I found a lot to generate key, now I got it. thank you so much
ReplyDeleteThis is really nice example to find facebook hash key... Really Grt work.
ReplyDeletewhen i try to run in cmd
ReplyDeleteC:\Program Files\Java\jdk1.7.0_07\bin>keytool -export -alias myAlias
it gives error such as keytool error:java.lang.Exception:keystore file doesnot exist.
i dont know whai t have did wrong.tell me the solution.
Thank u.
I have attempted this operation multiple times but no one has explained it as well as you have. This worked on the first time, I tip my hat, well done.
ReplyDeleteThank you
ReplyDeleteIs this hash key for all applications ?
ReplyDeleteWhat if there are two applications using facebook login
'C:\Program' is not recognized error
ReplyDeleteso simply write Progra~1 instead of the Program Files
Progra~1
You need to create with different package name.
ReplyDelete