How to create Facebook Hash Key in android ?

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 Hask 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.3 C:\openssl-0.9.8k_WIN32\bin\openssl enc -a -e (append with "|")

So , whole URL should looks like ,

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
About these ads

One thought on “How to create Facebook Hash Key in android ?

  1. Thank you, thank u very much your article helped me a lot…
    Nearly after10 days, searching over the internet I found a correct method to get the fb key..
    Thank u again

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s