Jul 08, 2015 Generate a key hash for Facebook integration with android using openssl Facebook uses the key hash to authenticate interactions between your app and the Facebook app. If you run apps that use Facebook Login, you need to add your Android development key hash to. Oct 13, 2013 Openssl link: Console path: keytool -exportcert -alias androiddebugkey -keystore%. Key Hash is on Facebook. Join Facebook to connect with Key Hash and others you may know. Facebook gives people the power to share and makes the world more open and connected.
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
Generate ssl key and chain free. 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.
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!
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
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.
Never did it on Mac before, but here are some advices:
Sep 26, 2019 To generate SSH keys in macOS, follow these steps: Enter the following command in the Terminal window. Ssh-keygen -t rsa. This starts the key generation process. When you execute this command, the. Press the ENTER key to accept the default location. The ssh-keygen utility prompts you for. Mar 22, 2019 Creating a Key pair. Open your terminal and run the following command under your username. local$ ssh-keygen -t rsa. This creates a public/private keypair of the. The prompt defaults to save the new key pair in the /home/username/.ssh/ directory and name it 'idrsa. How to generate an SSH key pair in Mac OS? Open up the Terminal by going to Applications - Utilities - Terminal. In the terminal, use the following command to start the key generation. Mac os generate ssh key.
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
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).
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.
(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