How to get Release Key Hash for android app Facebook


To authenticate the exchange of information between your app and the Facebook, you need to generate a release key hash and add this to the Android settings within your Facebook App ID. Without this, your Facebook integration may not work properly when you release your app to the store.
This article walk through the process of generating a hash key for android app.

  1. Get the path to your keytool.exe, on my own machine the path is C:\Program Files\Java\jre1.8.0_101\bin\keytool.exe. If you don't have java installed then you need to download it here and install first. 
  2. OpenSSL program for windows is also required, so download OpenSSL from Google (Download the version that is appropriate for your machine) 
  3. Create a folder named OpenSSL in your C:\ and extract all the content of the downloaded file from google. 
  4. Get the path to your debug.keystore. By default it is located in c:\users\{username}\.android\debug.keystore. You can do a search in C:\ directory if you can't find yours in that location. 
  5. Open command prompt in administrator's mode and type the following code to get your hash key First change directory to your java path, mine is C:\Program Files\Java\jre1.8.0_101\bin. So the code should look like this: 


C:\Program Files\Java\jre1.8.0_101\bin> keytool -exportcert -alias androiddebugkey -keystore C:\Users\Mark\.android\debug.keystore | C:\OpenSSL\bin\openssl.exe sha1 -binary | C:\OpenSSL\bin\openssl.exe base64



It will ask you for password just type android.

That's all. Happy coding.

No comments

Powered by Blogger.