Android: Facebook Login: The App has no Android Key hashes configured

16.8k views Asked by At

I am trying to get Facebook Login to work in my Android App:

Here's the partial code for this:

   private void performFacebookLogin()
                {
                    final Session.NewPermissionsRequest newPermissionsRequest = new Session.NewPermissionsRequest(this, Arrays.asList("email"));
                    Session openActiveSession = Session.openActiveSession(this, true, new Session.StatusCallback()
                    {
                     ...
                    }
                }

But when this code is invoked, the Facebook Login page shows up with this error message:

The App has no Android Key hashes configured. Configure your app key hashes at: http://developers.facebook.com/apps/AppID

On the developers page, i see no way of providing any hash key either, and am not sure how to generate the hash key itself.

4

There are 4 answers

3
Raghu Mudem On BEST ANSWER

You need to generate Key hashes for your android application. Follow the instructions given in Facebook integration quick start guide. And follow the instructions given in the attached screens 1,2,3,4,5. Once you added Key hashes you are done. And check the facebook integration code. It will work without any trouble.

Link for Facebook integration quick start guide facebook quick start

Instruction image for reference

Image 1 Image 2

Hope this helps you

6
Fouad Wahabi On

It's mentioned in the Facebook documentation :

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.

You can follow steps here : https://developers.facebook.com/docs/android/getting-started#release-key-hash

Steps to register the hash key:

  1. Enter to https://developers.facebook.com/apps/
  2. Create an app for Android
  3. Select Setting tab from the left side
  4. Enter the package name, class name and Hash Key
  5. Turn your app live from the Status & Review tab
0
M.Baraka On

They have changed this SDK follow the new Facebook sdk

0
Emmanuel Iyen On

Steps to add to solve this problem:

open to https://developers.facebook.com/apps/ Select your default App On side menu, select App Settings -> Basic Settings At the bottom click on Add Platform -> Create an app for Android Enter the Hash Key, package name, class name,

Save and you are fine...