The following are commonly encountered problems and solutions for the Facebook Login for Android.
I get the native login dialog permissions, but the person is not authenticated. The logcat exception error returned looks like:
...W/fb4a:fb:OrcaServiceQueue(504): com.facebook.orca.protocol.base.ApiException: remote_app_id does not match stored id
or,
I see a non-native login dialog that includes an error that looks like:
...App is Misconfigured for facebook login...
If you are having trouble with your login dialog, here are some things to try:
If you are having trouble with your key hash, here are some things to try:
onCreate()
in your main activity:
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { PackageInfo info = getPackageManager().getPackageInfo( "{your-package-name}", //Insert your own package name. 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) { } ...
Command not found
error, add the path to your global PATH
or go to the folder to run the following command:
C:\Program Files (x86)\Java\jdk1.6.0\bin
/usr/bin
debug.keystore
location. Check for the correct path. Keytool always ask for a password when it has the correct location.