I'm trying to obtain the key hash for integrating facebook into my Android app. But all over the net I can't find the way to do it on MAC OS X
, only for Windows
.
If someone could light me with the proper way to obtain the key hash I'd really appreciate it.
Thank you!
Steps : Go to facebook developer's page : https://developers.facebook.com/ Open the App tabs and than click the Setting. Paste the generate hashkey on HashKey's field = If you don't have it yet, get your key hash part of code.
I used following steps to generate a Key Hash for my app in facebook: (I am using Mac OSX 10.8)
Once you are in the “.android” directory, run the following command.
keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64
When it prompts you for a password, type android and hit Enter
Copy the value printed in the terminal that ends with an “=” and paste it in the Key Hash field in Facebook. Then click the Save Changes button.
Reference: Integrate Facebook logins in your Android app
Please follow below steps to find debug.keystore and generate key hash for android development at mac.
Open terminal
Type cd ~/.android and hit enter to go to .android directory
If you want to open .android directory in finder, type open . and hit enter. Then .android directory will be opened in finder where you can find debug.keystore. If you do not want to open .android directory and only want to generate key hash, then skip this point and follow #4.
In terminal where you are already in .android directory type
keytool -exportcert -alias alias_name -keystore sample_keystore.keystore | openssl sha1 -binary | openssl base64
and hit enter.
You are asked for password. Enter android as password and hit enter. Then you get key hash ending with "="
Copy key hash,enter in your facebook app setting page and save changes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With