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
.บทความนี้ ขอบันทึกเรื่อง เกี่ยวกับ hash key สำหรับ facebook integration สักนิดนึงครับ เผื่อมีประโยชน์ครับ. ปกติการทำ facebook login จะต้องใช้ key hash. Note: This guide is organized to follow after the shared setup steps for the Facebook SDK for Unity detailed in the Getting Stared guide. If you have not yet completed these steps please do so first. This document provides an follow up step-by-step guide to get started with the Facebook SDK for Unity on Android.
Generate Hash Key
If someone could light me with the proper way to obtain the key hash I’d really appreciate it.
Thank you!
How to&Answers:
Sorry, what key tool?
In this android example we will learn how to integrate facebook sdk to your android project, make facebook user login and post to facebook user wall. Click here to see documentation given by facebook for android sdk integration. There are various steps, Now we are going to explain facebook sdk integration step by step. As this is a quite confusing for everyone to generate the key hash in your PC, so i decided to write about it. I have also tried many ways but every time i failed to generate the key hash. After trying for an hour i successfully generated the key. May 08, 2016 How to Get Generate key hash for Facebook in android in windows XP,7,8.1,10. Download OpenSSL for windows form Google Code. After download OpenSSL extract the downloaded folder into C drive. Now locate your debug.keystore file which is inside your.android folder.
If you want to generate a Facebook App ID/Key, go to https://developers.facebook.com/apps and create a Facebook app.
If you want the keytool that you can use to create certificates etc, that is included in the jre.
Explanation for how to deal with the keys and hash here:
http://developers.facebook.com/docs/guides/mobile/#android
http://developers.facebook.com/docs/guides/mobile/#android
Answer:
![Generate Key Hash For Facebook Integration Android Generate Key Hash For Facebook Integration Android](/uploads/1/2/5/7/125754600/144919010.png)
I used following steps to generate a Key Hash for my app in facebook: (I am using Mac OSX 10.8)
- First open a terminal (open a command prompt in windows).
- Navigate in the terminal to the directory where your Android debug.keystore is stored.
- Mostly it will located under “/Users/user_name/.android/” (In Windows will be C:Documents and Settings.android).
- 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
Answer:
Generate Key Hash For Facebook Integration Android Tutorial
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 typekeytool -exportcert -alias alias_name -keystore sample_keystore.keystore | openssl sha1 -binary | openssl base64and 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.
Answer:
Never did it on Mac before, but here are some advices:
1.You need OpenSSL. Install it. In Windows I just extract zip file, then copy three file include openssl.exe in bin folder to jdk’s bin folder (where keytool is), don’t know how it work on Mac.
2.Copy file keystore what you want to get key hash to jdk’s bin folder. My keystore is debug.keystore (because I’m still in test, I don’t want to use the main keystore).
At that time Windows XP Product Key Finder Lite comes to rescue. Rslogix 5000 emulator activation key generator bus simulator 18 pc. Publisher: BonCut Software. Windows XP Product Key Finder software decodes Windows XP Product Key very easily. Home page:.
3.Using command line to go to jdk’s bin folder (In Windows, I just Run -> cmd -> type cd %JAVA_HOME%)
![Generate Key Hash For Facebook Integration Android Generate Key Hash For Facebook Integration Android](/uploads/1/2/5/7/125754600/907140014.png)
4.Type this command:
keytool -exportcert -alias alias_name -keystore sample_keystore.keystore | openssl sha1 -binary | openssl base64
keytool -exportcert -alias alias_name -keystore sample_keystore.keystore | openssl sha1 -binary | openssl base64
In my case (debug.keystore):
keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64
then enter password for debug.keystore: android (without password, the key hash’s still generated and the same as with password, don’t know why).
keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64
then enter password for debug.keystore: android (without password, the key hash’s still generated and the same as with password, don’t know why).
You’ll get some string with “=” character at the end. Go to your app setting -> mobile -> fill that key hash (include “=”) to Android key hash.
Answer:
(honestly, not an answer, just a note for all visitors having this or similar trouble)
There is a way to obtain a key hash without JDK and OpenSSL by using pure Java utility android-fb-keytool. You can checkout and build source code.
Create Hash Key
Tags: androidandroid, facebook, hash