Key hash for Facebook Android SDK Key hash for Facebook Android SDK java java

Key hash for Facebook Android SDK


You can install Open SSL from here , that should make your command work


I created a batch script facebookkeydebug.bat, which return desired Facebook key hash. Just edit the script, set correct paths, keystore name and run it.

:: Getting Android key hash for Facebook app on Windows:: Requirement: OpenSSL for Windows (http://code.google.com/p/openssl-for-windows/downloads/list):: Usage: set paths and run facebookkeydebug.bat@echo Exporting keystore certkeytool -exportcert -alias androiddebugkey -keystore C:\Users\myusername\.android\debug.keystore -storepass android -keypass android > debug.keystore.bin@echo Converting to sha1C:\PROGRAMS\openssl-0.9.8k_X64\bin\openssl sha1 -binary debug.keystore.bin > debug.keystore.sha1@echo Converting to base64C:\PROGRAMS\openssl-0.9.8k_X64\bin\openssl base64 -in debug.keystore.sha1 -out debug.keystore.base64@echo Done, Android hash key for Facebook app is:C:\PROGRAMS\openssl-0.9.8k_X64\bin\openssl base64 -in debug.keystore.sha1@pause

EDIT: I published a repo with some batch scripts for signing and getting cert keys on Windows: https://github.com/petrnohejl/Android-Scripts


  1. Download and install OpenSSL from http://slproweb.com/products/Win32OpenSSL.html based on windows 32 or 64 bit.(Note: Download and install first visual C++ 208 redisributable from that site also )
  2. Put the bin directory of installed OpenSSL in windows path.
  3. Open the command prompt and go to C:\Users{User_Name}.android
  4. now put this command on cmd "keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64".(refer https://developers.facebook.com/docs/android/getting-started#samples)
  5. Now enter password "facebook" without double quote.
  6. Now a hash key will be generated enter image description here
  7. Finally go to the Facebook Developer site. Make sure you are logged into Facebook and, using the dropdown menu in the top-right, go to your 'Developer Settings':
  8. Once you're in your developer settings, select 'Sample App' from the navigation on the left, and add and save your key hash into your profile:enter image description here