Friday, April 12, 2013

Generate Hash Key For Facebook 

In order to generate key hash you need to follow some easy steps.

1) Download Openssl from:

2) Make a openssl folder in C drive

3) Extract Zip files into openssl folder

4) Copy the File debug.keystore from .android folder in my case (C:\Users\ and paste into JDK bin Folder in my case (C:\Program Files\Java\jdk1.6.0_05\bin)

5) Open command prompt and give the path of JDK Bin folder in my case (C:\Program Files\Java\jdk1.6.0_05\bin).

6) Copy the code and hit enter keytool -exportcert -alias androiddebugkey -keystore debug.keystore > c:\openssl\bin\debug.txt

7) Now you need to enter password, Password = android.

8) See in openssl Bin folder you will get a file with the name of debug.txt

9) Now either you can restart command prompt or work with existing command prompt

10) comes to C drive and give the path of openssl Bin folder

11) copy the following code and paste openssl sha1 -binary debug.txt > debug_sha.txt

12) you will get debug_sha.txt in openssl bin folder

13) Again copy following code and paste openssl base64 -in debug_sha.txt > debug_base64.txt

14) you will get debug_base64.txt in openssl bin folder

15) open debug_base64.txt file Here is your Key hash.

Hope This Help....................


  1. at step 13: when I give command in cmd and hit enter it gives error of
    openssl has stopped working...
    window is checking for solution for the problem...
    ??? why so??
    and the file debug_base64.txt is empty...contains nothing.

    please solve my issue as its last step

  2. Great.... I have try many tricks but no one correct, but in this way i got the result.