Facebook sdk 3.0 android

I read tutorials on developer.facebook.com for the main facebook facebook application for android for countless times to make sure they weren’t wrong, but I get the error message “remote_app_id does not match the saved identifier”, but it matches and is not sure why is he throwing this error. Also, when I run samples, I get a failed binder transaction. Now, what is strange is that if I remove the fb application on my phone and force the user to log in to facebook, the main hello world application application works. Am I doing something wrong or is it a sdk problem on facebook. I already downloaded and reinstalled everything, but still got the same problem.

+1
source share
3 answers

Another possible mistake (which happened to me) is the following: create a “Key cache” in the Facebook App Console and sign the Android application using another keystore.

Unfortunately, this is because Facebook Getting Started Tutorial is causing this error. It says that Android developers should use the standard debug key for Android in your examples and do not explain that the key hash should be generated with the same keystore that you sign in your application.

My recommendation is to set up two hash keys on your facebook console:

  • standard debug key for Android:

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

  • your application key:

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

Remember: you cannot publish an application signed with the debug key generated by the SDK tools. Thus, it is not possible to publish the application using only the hash key generated using the first previous command line (as the facebook tutorial suggests.

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

+2
source

to try

try { PackageInfo info = getPackageManager().getPackageInfo("com.eatapp", PackageManager.GET_SIGNATURES); for (Signature signature : info.signatures) { MessageDigest md = MessageDigest.getInstance("SHA"); md.update(signature.toByteArray()); Log.e("MY KEY HASH:", Base64.encodeToString(md.digest(), Base64.DEFAULT)); } } catch (NameNotFoundException e) { } catch (NoSuchAlgorithmException e) { } 

in your main business :-) This is the only solution that it works for me for Android SDK 3.0

+2
source

solvable.

The hash value is incorrect. It seems to be a windows problem or a failure on the human end. I used:

"location keytool.exe" -exportcert -alias alias -keystore "location keystore" | "location of openssl.exe" sha1 -binary | "location of openssl.exe" base64

and got the wrong hash value. Anyways found this post.

http://p-xr.com/implementing-facebook-into-your-app-invalid-key-with-keytool/

I downloaded and launched the application for generating keys and got the value of the hash function from the logarithm. This is great for a debug key, but you don’t know when you send your program to the wild.

Hope this helps

+1
source

Source: https://habr.com/ru/post/1501033/


All Articles