Facebook App Generate Key Hash

/ Comments off

How to generate release key hash or sha1 for Facebook in the android studio, This section of the tutorial explains you how to get Key Hashes for the Android Facebook app. Facebook SDK integration to android requires a key hash configuration.

While integrating Facebook SDK, we need to configure Facebook API console with Key Hash. If a key hash is missing you will get App mis-configured error in the Facebook dashboard.

Download the facebook-android-sdk and configured a new app. In the application, settings enable the “Native android app” and enable for Facebook login and deep linking. It asks for key hashes, and I’m stuck. After spending a generous amount of time, I have found two solutions to get the key hashes.

Facebook App Generate Key Hash Download

  • Download OpenSSL from Google code (If you have a 64-bit machine you must download OpenSSL-0.9.8e X64, not the latest version)
  • Extract it. Create a folder- OpenSSL in C: / and copy all files here
  • Find “debug.keystore” file path. Most likely it will be inside “C:Users.android” folder. However, if you still don’t find then perform a search. I am sure you are lucky enough to get it.
  • Find keytool.exe path. It will be inside your java/bin directory. In my system it is under “C:Program FilesJavajdk1.6.0_30bin”
  • Open command prompt (Run-> cmd->start) and go to java /bin folder (cd “C:Program FilesJavajdk1.6.0_30bin” command will do it for you)
  • Now you run the below command.
  • Provide password (android), as when you are prompted. You are done. It will generate you the key-hash

How to generate release key hash or sha1 for Facebook in the android studio, This section of the tutorial explains you how to get online generating sha1 key. How to generate release key hash or sha1 for Facebook in the android studio, This section of the tutorial explains you how to get online generating sha1 key. Home; About Us. Jul 20, 2018  I will Show you Today How to get Development Key Hashes and Release Key Hash for android app Facebook very easly. Generate SHA1 fingerprint of release keystore using keytool.

  1. In order to generate key hash you need to follow some easy steps. 1) Download Openssl from: here. 2) Make a openssl folder in C drive 3) Extract Zip files into this openssl folder created in C Drive. 4) Copy the File debug.keystore from.android folder in my case.
  2. In the Configuration section, click Show App Info to reveal your Android Key Hash. Enter your Key Hash at Facebook. Log into your Facebook Developer Account and select the Facebook App. Navigate to Settings and scroll down to find the section labeled Android. Delete the old Key Hash by clicking the X. Enter your new Android Key Hash into the field.
  3. To run samples apps quickly, you can generate key hashes for your development environments. Add these to your Facebook developer profile for the sample apps. Keytool, for generating the key hashes, is included with the Java SE Development Kit (JDK) that you installed as part of setting up your development environment.
  4. Setting a Release Key Hash. To authenticate the exchange of information between your app and the Facebook, you need to generate a release key hash and add this to the Android settings within your Facebook App ID. Without this, your Facebook integration may not work properly when you release your app to the store.
  5. May 08, 2016 Simplest easiest method to access find key hash in windows step by step tutorial for beginners. The key hash is a type of simple authenticate key generate by your android development enviournment which will authenticate our developed android application ( In which we are going to add Facebook login ) and gives us the access to use Facebook login into our app.

Alternative Method and its 100% working

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!

How to&Answers:

Sorry, what key tool?

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

Answer:

I used following steps to generate a Key Hash for my app in facebook: (I am using Mac OSX 10.8)

  1. First open a terminal (open a command prompt in windows).
  2. Navigate in the terminal to the directory where your Android debug.keystore is stored.
  3. Mostly it will located under “/Users/user_name/.android/” (In Windows will be C:Documents and Settings.android).
  4. Once you are in the “.android” directory, run the following command.

    keytool -exportcert -alias androiddebugkey -keystore debug.keystore openssl sha1 -binary openssl base64

  5. When it prompts you for a password, type android and hit Enter

  6. 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:

Please follow below steps to find debug.keystore and generate key hash for android development at mac.

  1. Open terminal

  2. Type cd ~/.android and hit enter to go to .android directory

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

  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.

  5. You are asked for password. Enter android as password and hit enter. Then you get key hash ending with “=”

  6. Copy key hash,enter in your facebook app setting page and save changes.

Answer:

Facebook App Generate Key Hash On Mac

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

3.Using command line to go to jdk’s bin folder (In Windows, I just Run -> cmd -> type cd %JAVA_HOME%)

4.Type this command:
keytool -exportcert -alias alias_name -keystore sample_keystore.keystore openssl sha1 -binary openssl base64

Key

Generate Hash Online

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

Generate Hash Code

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.

Generate Sha256 Hash

Answer:

Monster hunter generations online hub key quests. (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.

Tags: androidandroid, facebook, hash