How to create key hash in Windows 7 64bit

Recently i tried to get started with Facebook SDK for Android . Actually there is a good tutorials for getting started in facebook developer site. I followed this link

I created a sample app in Facebook developer site and added the key hash in App setting . but When started the app i found the Facebook Authentication is working at all.I got

Mobiletest is misconfigured for Facebook login. Press okay to go back to the application without connecting to facebook

If you press okay it will go back to the application. And it will show an error like
Login Failed: invalid_key: android key mismatch. Your key "abcdefghijklmns" Does not match tje allowed keys specified in your application Settings

This is because you have entered a wrong key in Apps settings in
After lot of googling i found that the keytool am using giving a wrong key hash. The error is caused by Openssl-for- windows library. Actually i downloaded the latest openssl-for-windows library from Google code. After more searching i found the latest library won't work fine in 64 bit windows. I will list out what i have done.

  1. First download openssl-0.9.8e_X64 (Note it's not the latest version. The latest version when am writing is openssl-0.9.8k_X64).
  2. Extract it . You will found libeay32.dll, ssleay32.dll and openssl.exe in bin folder. Copy it to C:\Windows\SysWOW64 (If it's added to path or Extract it somewhere and give the full path in command). 
  3. Use this comand 
  4. keytool -exportcert -alias androiddebugkey -keystore %HOMEPATH%\.android\debug.keystore | openssl sha1 -binary | openssl base64
  5. use the password android 
  6. Copy and paste the 30 character key hash in Facebook
Now it's works fine for me.


was delighted to find this web site.I wanted to thank you for your time reading this wonderful! I really enjoyed every bit of it and I've marked to ensure that the blog post something new.
Unknown said…
would like to appreciate your efforts that bring really nice work and also engage all people here to take opportunity for share their views. This is truly nice.
BluRay Disc Duplication

Popular posts from this blog

Configure PostgreSQL and phpPgAdmin in WAMP

Angular - 4 year road map

Flash FLV player using PHP