I am using Facebook login in my app. Previously it was worked fine, that app is also is in play store. But from fast few days i am unable to login with Facebook.
cureently am getting this error.
We have using fallowing code in my app
implementation 'com.facebook.android:facebook-login:5.0.0'
loginButton.setReadPermissions(Arrays.asList("Email", "public_profile"));
callbackManager = CallbackManager.Factory.create();
loginButton.registerCallback(callbackManager, new FacebookCallback<LoginResult>() {
@Override
public void onSuccess(LoginResult loginResult) {
getUserProfile(loginResult);
}
@Override
public void onCancel() {
}
@Override
public void onError(FacebookException exception) {
}
});
private void getUserProfile(LoginResult currentAccessToken) {
GraphRequest request = GraphRequest.newMeRequest(
currentAccessToken.getAccessToken(), (object, response) -> {
try {
firstName = object.getString(Constants.FACEBOOK.FIRST_NAME);
lastName = object.getString(Constants.FACEBOOK.LAST_NAME);
email = object.optString(Constants.FACEBOOK.EMAIL, "");
id = object.getString(Constants.FACEBOOK.ID);
imageUrl = String.format(getString(R.string.profile_pic_url), id);
if (TextUtils.isEmpty(email)) {
fbSigUp = true;
//facebook to getting email null
gettingEmail(null);
} else {
loginWS();
}
} catch (JSONException e) {
e.printStackTrace();
}
});
Bundle parameters = new Bundle();
parameters.putString(getString(R.string.field), getString(R.string.fbrequiedfields));
request.setParameters(parameters);
request.executeAsync();
}
So can anybody help me to figure it out.