How to generate Key Hash for facebook SDK In Mac

Viewed 68457

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!

6 Answers

(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.

On a Mac, for generating a key hash, follow the simple steps below.

  1. Open Terminal
  2. Paste Below Command (Step 3) And Hit Return
  3. keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64
  4. Enter Password : Android
  5. It will give you Key hash (like MibyjIEJWghOLquRdk9esClXHWH=)
  6. This will give you a debug key hash. Also we can generate a Release key hash with the same Process. Just need to change our keystore path and password.

Happy Coding. Thank You

Related