0

I integrated an Android app with the Facebook Android SDK 3.02b and am getting the 'app is misconfigured' message on the facebook authorization screen. This is strangely only happening for the debug apps, e.g. the ones that are signed with the debug keystore.

  • I verified I took the hash for the correct keystore, e.g .android/debug.keystore - this is also the one configure in Eclipse (that I use to run and install the app)
  • I added both hashes to the facebook app configuration.
  • I strangely cannot see any log messages pointing to the key issues, even though logging is turned on in Util.java

Any ideas?

joce
  • 9,624
  • 19
  • 56
  • 74
Sven Haiges
  • 2,636
  • 5
  • 42
  • 54

1 Answers1

1

Check after updating to the latest 3.0 SDK and try and print out the key hash being sent to Facebook.

The Getting Started Guide > Run the Samples section has info on how you can do that. But basically, you can add this code to your activity's onCreate() and check the logcat:

    try {
        PackageInfo info = getPackageManager().getPackageInfo(
            "your package name, e.g. com.yourcompany.yourapp]", 
            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 (NameNotFoundException e) {

    } catch (NoSuchAlgorithmException e) {

    }
C Abernathy
  • 5,533
  • 1
  • 22
  • 27