I am using Facebook login in android.
Code:
callbackManager = CallbackManager.Factory.create();
LoginButton loginButton = (LoginButt
This error is returned in other situations too - even when your app is public or you're listed as a tester.
Double check that your
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
is resolving to a correct Facebook App ID, especially if you dynamically specify it using gradle build, rather than hard coding it in strings.xml.
Add a string resource "facebook_application_id" in your strings.xml
replace APP_ID with your facebook app id
<string name="facebook_application_id" translatable="false">APP_ID</string>
Documentation on facebook is not correct. I had to add all 3 default permissions to make it work.
loginButton.setReadPermissions("email", "public_profile", "user_friends");
In my case problem was wrong generated Key Hash which need to submit on facebook app page Solution found on this article https://developers.facebook.com/docs/facebook-login/android/advanced
Manually Check Key Hash - You can print out the key hash sent to Facebook and use that value in App Dashboard. Make this change to onCreate() in your main activity:
try
{
PackageInfo info = getPackageManager().getPackageInfo(
"com.facebook.samples.loginhowto",
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) {
}
Live developer mode Please check status of Developer mode. It must be "Live". Firstly, you need add privacy url for own facebook project which you want to test facebook login or sth .... Then enable developer mode (Turn on)