Android Facebook SDK 3.0 gives “remote_app_id does not match stored id” while logging in

Another possible error (which happened with me) is: to set up a “Key Hash” at Facebook App Console and to sign the android app using another keystore.

Unfortunately this is caused because Facebook Getting Started Tutorial induces this error. It says that android developers should use default android debug key in your examples and doesn’t explain that the Key Hash should be generated with the same keystore you will sign your application.

My recomendation is to set up two Key Hashes at your facebook console:

  1. default android debug key:

keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore | openssl sha1 -binary | openssl base64

  1. your application release key:

keytool -exportcert -alias yourappreleasekeyalias -keystore ~/.your/path/release.keystore | openssl sha1 -binary | openssl base64

Remember: you cannot publish an application that is signed with the debug key generated by the SDK tools. So it isn’t possible to publish an app using only the hash key generated using the first previous command line (as facebook tutorial suggests.

For more information about signing your application, visit Signing Your Application.

Leave a Comment