0

I want to do Facebook Integration with Android App. I tested a lot of example this subject . But my project give me "The App has no Android key hashes configured. Configure your app key hashes https://developers.facebook.com/apps/AppId" error.

I created key hashes after .I open this developers.facebook.com/apps website. After I put this key hashes into Development Key Hashes field. But I did not understand. Why my app give me this error?

My application's code: http://speedy.sh/87Wfs/facebooklogin.rar

Kerim Baki
  • 1
  • 1
  • 4
  • I solve my error.Solution is twenty eighth answer into http://stackoverflow.com/questions/23674131/android-facebook-integration-invalid-key-hash – Kerim Baki Mar 25 '15 at 07:54

2 Answers2

0

There is two field you can enter the key hashes, maybe you entered it in the wrong one. Also to get the key hash you can try this code :

PackageInfo info;
try {
info = getPackageManager().getPackageInfo("com.you.name", PackageManager.GET_SIGNATURES);
for (Signature signature : info.signatures) {
    MessageDigest md;
    md = MessageDigest.getInstance("SHA");
    md.update(signature.toByteArray());
    String something = new String(Base64.encode(md.digest(), 0));
    //String something = new String(Base64.encodeBytes(md.digest()));
    Log.e("hash key", something);
}
} catch (NameNotFoundException e1) {
    Log.e("name not found", e1.toString());
} catch (NoSuchAlgorithmException e) {
    Log.e("no such an algorithm", e.toString());
} catch (Exception e) {
    Log.e("exception", e.toString());
}
Ced
  • 15,847
  • 14
  • 87
  • 146
0

Unfortunately.I ran your code .But My app give same error.Other way; I use this command for I create key hashes

keytool -exportcert -alias androiddebugkey -keystore "C:\Users\admin.android\debug.keystore" | "C:\openssl\bin\openssl.exe" sha1 -binary | "C:\openssl\bin\openssl.exe" base64

At the same time really I sure .I have not mistake while I entered key hashes into Development Key Hashes field.do you have got different solution?

Kerim Baki
  • 1
  • 1
  • 4