JAVA - Android - getting hash key for Facebook Integration
العربية
български
català
中文
čeština
dansk
Nederlands
eesti
suomi
français
Deutsch
Ελληνικά
עברית
हिंदी
magyar
Bahasa Indonesia
italiano
日本語
한국어
latviešu
lietuvių
norsk
polski
Português
română
русский
slovenčina
slovenski
español
svenska
ไทย
Türkçe
українська
Tiếng Việt
I am trying to implement Facebook into my app to allow things like sending stuff to the user's wall, updating status', etc.
So after downloading the stuff I was told to get a key using the keystore file. I decided to be brave and create my own keystore file (for publishing stuff later) and did so successfully.
After creating the file though I am having all sorts of problems trying to retreieve a key from it, i entered the command via keytool/command prompt and it asked me for my keystore password...
After entering the password i set in the first place, I am getting nothing but wierd ascii symbols and letters and my keystore details also in the middle of it. What is going wrong??
UPDATE: Ok, I am aware you may need to use OpenSSL to display the text correctly. I have installed OpenSSL but how do I use it to get the Hash code?
Answer |
I always use this method under Linux, because it fails in the original way:
keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore > key.out
cat key.out | openssl sha1 -binary > key.bin
cat key.bin | openssl base64
You will get the key you need to enter on page mobile, android section of your Facebook apllication. Every time you use different keytore to sign your app, you need to change the key on the facebook page also.