Android Facebook SDK release key hash doesn't work - android

I have a problem with my app facebook key hashes on release build.
I have generated release key hash from keystore file with this command:
keytool -exportcert -alias <RELEASE_KEY_ALIAS> -keystore <RELEASE_KEY_PATH> | openssl sha1 -binary | openssl base64
and pasted it to developers.facebook page. However, when I try to login, it says that key hash which is shown doesn't match any of listed in developers page. If I paste that shown key hash, facebook login will work, but I want facebook to work for other users without putting their key hashes to developer page.
How could I do that?

You have to make your app public for other devices to work.
Go to your facebook developer console and select your project(app) from app section.Then in status and review turn on the option--Do you want to make this app and all its live features available to the general public?.
You will need an email id to turn it on so add one if you haven't already.

Related

Trying to get Release Key Hash for Facebook login

I am developing an Android application, where I am using a Facebook login button.
Firstly I have created Signed release APK from an Android studio and created new keystore. Then I tried to create Release Key Hash for my application, with OpenSSL. That's the command I have used:
keytool -exportcert -alias facebook -keystore ...\keystore.jks | D:\openssl-0.9.8e_X64\bin\openssl.exe sha1 -binary | D:\openssl-0.9.8e_X64\bin\openssl.exe base64
Afterwards, I was asked for a password, here I have provided the password that I have generated when creating Signed release APK.
I copy the key, that was provided from the console and copied it to Key hashes input in facebook console.
However, whenever I try to use facebook login, I got the error:
Invalid key hash. The kay hash ...... does not match any stored hashes...
If I copy the key that is provided in error to facebook console, it works as it should, but I don't want to do that for each person that will use my application, do I?
Thanks for your help!
I faced the same issue and was able to fix it by following instructions from Why keytool is generating different facebook androiddebugkey hash?
Also I had missed to set the my application's status from development to live in Facebook console.

After upload app on Play store Facebook Login is can't work show invalid hash key

I integrate fb login in my app and its works well but when I upload app on play store its give error Invalid hash key. I generate hash key using this command :-
keytool -exportcert -alias einvite -keystore C:\Users\Lenovo\Documents\Einvitecode\einvite.jks | openssl sha1 -binary | openssl base64
He asked my keystore password I enter keystore password. After I enter password It show a hash key. I copy hash key and paste its my developer accounts and save its. But when I download my app login Its show Invalid hashkey.
Make sure you are actually signed apk with einvite.jks and einvite key. If this is correct then open your app in the Facebook Developer console, open App Review and make sure that in your application turned on a public access. By default your app is in Development mode. Maybe this will help
i faced the similar problem don't know why it changed after uploading to the store but I added the new Hash (as mentioned) in the Facebook messaged to the Key Hashes in my app on developers.facebook.com/app//settings/Basic. And now it is working.!

Facebook Login Integration Failed in Android app

I implemented login with facebook in my android app few days ago and everything was working well. But now I'm getting the error "Invalid Api Key Hash..." with a different api key hash from which I obtained from command prompt.
If I delete the app in the user's facebook profile that logged in ("Configuration --> Applications") the error dissapears.
Any ideas about what could be the problem?
May be the key-store is changed which generate the new key Hash. You can add this new key Hash in the app registered on the Facebook developer account
This link will help you in generating the key hash which is a debug key-hash https://stackoverflow.com/a/9600642/5907003
Facebook does not allow login to public while you not allow it. You may use this command in Linux machine and paste the hash key in your Facebook development account > settings > Basic > Key Hashes
keytool -exportcert -alias androiddebugkey -keystore "<path-to-users-directory>\.android\debug.keystore" | openssl sha1 -binary | openssl base64
if it is still under development or you may visit https://developers.facebook.com/ to allow it for public, to do it select your Application after login into your development account and choose App Review from side menu then swich Yes.
The hash code, which was created from command prompt, works only one time. You can find more information here: android facebook integration invalid key hash

Facebook asks for Android key hashes for app that is still in sandbox mode

I'm getting the following unexpected error from Facebook when I try to log in via my (emulated) Android app on Eclipse on OSX 10.9:
"This app has no Android key hashes configured. Configure your app key hashes at http://developer.facebook.com/apps/appID/"
Now on Facebook this app is in Sandbox mode. I've added my hash key to the "Sample App Settings" under the Developer settings.
I've generated this hash key with this command (like prescribed in the Getting started guide of Facebook):
MacBook-Pro:.android macbook$ keytool -exportcert -alias androiddebugkey -keystore /Users/macbook/.android/debug.keystore | openssl sha1 -binary | openssl base64
Enter keystore password: android
Why does Facebook still ask me for specific app key hashes, from an app that is still in sandbox mode? And how do I fix this? Is there something wrong with my keytool?
The "Sample App Settings" is only so that you can run the sample apps that ship with the SDK.
For your app, you need to add the key hashes to your app's "Native Android App" section.
See this doc for more details: https://developers.facebook.com/docs/android/getting-started/#create-app

android facebook login for all user

I am new to Android and I created app which has Facebook login on it. During development time I have created facebook app and also created hash key. Everything works fine but what hash key should I put there (in facebook application) and upload to Google Play that every user can login via facebook.
keytool -exportcert -alias android-release -keystore app-release.keystore | openssl sha1 -binary | openssl base64
You have to replace "android-release" with the name of the alias you used to sign the Market version of the app and replace "app-release.keystore" with the name/path of the appropriate (not debug) keystore.

Categories

Resources