0

just started using Facebook SDK for android.

I'm creating an app to post images on facebook, I am using the facebook 4.6.0 version.

I can post Images with the debug version of the app (but I can only post with the administrator account of the facebook app, don't know if that's normal or not). After the creation of the signed APK I can't post with any account on facebook don't know why.

I think my Key hashes are correct...

I am using this method to get the release key hash:

private void generateHash() {
    try {
        PackageInfo info = getPackageManager().getPackageInfo(
                "com.teracoding.screenquotes",
                PackageManager.GET_SIGNATURES);
        for (Signature signature : info.signatures) {
            MessageDigest md = MessageDigest.getInstance("SHA");
            md.update(signature.toByteArray());
            Log.d("KeyHash:", Base64.encodeToString(md.digest(), Base64.DEFAULT));
        }
    } catch (PackageManager.NameNotFoundException e) {

    } catch (NoSuchAlgorithmException e) {

    }
}

I also tried generate the key from the terminal with this command:

keytool -exportcert -alias “mealhas” -keystore “path to .jks" | openssl sha1 -binary | openssl base64

but still nothing ...

Thanks in advance.

Cap.Alvez
  • 1,363
  • 3
  • 17
  • 19

1 Answers1

0

I am also suffer this problem, you have to generate KeyHash from your generated keystore than update Facebook developer page with new keyHash, becasuse your local keyhash is not supported, Plz refer this enter link description here

Community
  • 1
  • 1
Mohit Suthar
  • 8,725
  • 10
  • 37
  • 67