Generate Key Hash For Facebook Android

14.04.2020by
Generate Key Hash For Facebook Android 9,8/10 3659 reviews

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. Dec 26, 2013  But Now i remember whole the process to generate hash key. When you start to create new Facebook application for android they ask Hash Key to validate your application. Most of the time user confused to generate Hask key and Key Store, They confused that from where to start? It mean which path should be use to generate key? How to Generate. Jan 18, 2018 I make a test: put this 'new' key hash in facebook developers key hashes too and tried again and I was able to login successfully. The problem is that key hash is not my key hash generated and saved in the facebook developers app configurations. @saimonventura Does you continues do use this hash key in your facebook developer as production?

  1. Mar 09, 2018 How to Generating a Development Key Hash Facebook andree23. Get Android key hash to Facebook - Duration: 4:34. Generate SHA1 fingerprint of release keystore using.
  2. May 23, 2019 Key hash authenticates the information between your application and Facebook server. Adding key hash in Facebook developers console is mandatory and if you want to use the Facebook Login in your android mobile application then you have to add the key hash. In this tutorial we would Generate Release key hash for Facebook Login in Android devices.
  3. Trying to create an android app with Facebook integration, I've gotten to the part in the docs where you have to generate a key hash file, it specifies to run the following code keytool -exportcert.

I’m really having troubles with the Facebook hash key.
I generated it in my Eclipse. proof:

Then I went to https://developers.facebook.com/ and registered a new app.

And finally I’ve set my hashkey at the settings of Facebook developers:

But no whatter I do I keep getting the same error log:
“Key hash B5dWUEYfZJL/……….jyA= does not match any stored key hashes”

Does anybody know what I did wrong or how I can fix this problem?
If I used the id and name from the HelloFacebookSample inside my own app everything works.
So it HAS to do with the key hash, id or name I’ve set somewhere most likely.

Thank you,
Yenthe

Answers:

After hours of trying I’ve finally found a solution.

  1. Delete any app on the website of Facebook (developers.facebook.com)
  2. Delete the file debug.keystore under C:UsersyourUserName.android
  3. Generate a new key (by running your app again)
  4. Create a new app on developers.facebook.com and add the new hash key
  5. Re-run your app
  6. Succes!
Answers:

If your login is working without installing facebook app and not working when facebook app is installed due to error “hash key has not match” then do following steps

1 ) Launch your app and try to log in with facebook. A dialog will open and tell you: “the key has not been found in the facebook developer console and also show the hash key.

2 ) Note down that hash key.

3 ) Put it into your facebook developer console where you first generated your api key and remove the hash key with new and save. Now you are done. Anyone that downloads your app, published with earlier used keystore can log into facebook.

Answers:

Adding SHA1 keys from Eclipse/keytool helped me only when creating the app on FB, then after rebuilding I would always get the OP error.

What solved my issue was adding the key in the error message to the Facebook dashboard settings.

Generate Key Hash For Facebook Android Update

Answers:

I faced the same issue while development and needed to get the hash key to test sharing on facebook, and while solving this I went through couple of issues

1- the command facebook provide to get the hash key by using openSSL command didn’t give me the right hash that I got by extracting the signature from Package info with code.
getting the hash by the second way was correct.

2- For some reason, In the documentation they tell you to go to developer settings and add the hash key for ‘Sample App’ there, I thought every hashkey for a developer should be there, and that was my mistake, every app has it’s own hash keys field to add to, go to your app/settings/android.

well that was it. and for the records I used openssl-0.9.8k_X64 on a Windows 7 x64 bit
and it just generates a wrong hash I don’t know why

I used this code to get the hash:

but be careful that this may not also print in logs the correct keyhash, at least on my device and machine, when I debug it, in a watch it shows the correct hash just before printing the logs, but in logs it shows another hash and the first one was the correct one.

anyway you can also use a command or eclipse to view the SHA hexadecimal sequence for your key and convert it to base 64 online, there are websites that may help
http://tomeko.net/online_tools/hex_to_base64.php?lang=en

Good luck

Answers:

I encountered a similar problem. The solution is surprisingly simple.

The error message looks like this:

Simply log into https://developers.facebook.com , select the “Settings” tab, and add the key hash “sL1***************VY=” to the list of saved Key hashes in the Android panel.

Answers:

I have had this Problem for two months now. My key hashes have been pyling up to 9.
Today i finally found the simple solution:

STEP 1:

Install the facebook sdk you downloaded from the facebook developer page on your phone. Don´t install the normal facebook app. Make sure you can log into facebook. Then log out.

STEP 2:

Export your app with your final release key as an apk, like you would when uploading it to the playstore.

STEP 3:

Put the Apk file on your phone via usb cable or usb stick.

STEP 4:

Install your app, using a file manager: For example
https://play.google.com/store/apps/details?id=com.rhmsoft.fm

STEP 5:

Launch your app and try to log in with facebook.
A dialog will open and tell you: “the key has not been found in the facebook developer console

STEP 6:

Write down the key.

STEP 7:

Put it into your facebook developer console and save.
Now you are done.
Anyone that downloads your app, published with earlier used keystore can log into facebook.

Enjoy

Answers:

It is looks crazy but it work

Really issue because of you privite facebook account got this app and hash key of this account does’t comparable

But you musn’t to faced this error with real user. But I am not sure

Eventually follow next step :

  1. Go to your private facebook account which you try to log in
  2. Then click More in app dir
  1. Click Settings

Generate Hash Online

And then click cross

And now you can login with facebook. But next time if you log out and than will try log in again you faced with the same issue…

It is also weird…

But I don’t bellieve that facebook don’t know about this …

Answers:
  1. Check your Key hash value.
  2. Uninstall the Facebook application from your phone.
  3. Then try again using SDK.

This solved my problem.

Answers:

Using Debug key store including android’s debug.keystore present in .android folder was generating a strange problem; the log-in using facebook login button on android app would happen perfectly as desired for the first time. But when ever I Logged out and tried logging in, it would throw up an error saying: This app has no android key hashes configured. Please go to http:// ….

Creating a Keystore using keytool command(keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -sigalg SHA1withRSA -keysize 2048 -validity 10000) and putting this keystore in my projects topmost parent folder and making a following entry in projects build.gradle file solved the issue:

Please note that you always use the following method inside onCreate() of your android activity to get the key hash value(to register in developer.facebook.com site of your app) instead of using command line to generate hash value as command line in some cased may out put a wrong key hash: Key generator in java example.

Answers:

I got the same problem. I found that I used wrong hashkey. keytool printed wrong hashkey because I run command with wrong alias.
Please check your command again.It will resolve your issue

Answers:

Check your google-services.json . May be it is different one. Download your latest google-services.json and then run the app. Hope it helps.

Answers:

I got simular problem. After signing and publishing my app to the google PlayStore it seems the Hash has changed.
I added the new Hash (as mentioned) in the Facebook messaged to the Key Hashes in my app on developers.facebook.com/app//settings. Now it works again.

Answers:

“Enabled Single Sign On for Your App” that’s why it work only one time. please go to developer.facebook and check settings.it work for me

Tags: facebook, hash

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 your Facebook developer profile.

This article share the process of generating a key hash for Facebook integration with android using openssl

  1. Download openssl from Google code (If you have a 64 bit machine you must download openssl-0.9.8e X64 not the latest version)
  2. Extract it. create a folder- OpenSSL in C:/ and copy the extracted code here.
  3. Detect debug.keystore file path. If u didn’t find, then do a search in C:/ and use the Path in the command in next step.
  4. Find the keytool path which is in Jre directory. (C:Program FilesJavajre7bin)
  5. Detect your keytool.exe path and go to that dir/ in command prompt and run this command in 1 line

    keytool -exportcert -alias androiddebugkey -keystore “C:Documents and SettingsAdministrator.androiddebug.keystore” – “C:OpenSSLbinopenssl” sha1 -binary ”C:OpenSSLbinopenssl” base64

* that’s all. u will get a key-hash
Video tutorial coming soon, subscribe us on YOUTUBE
Comments are closed.