I'm using facebook android sdk v4.7.0 Trying to facebook Login and getting an exception about:
{Response: responseCode: 400, graphObject: null, error: {HttpStatus: 400, errorCode: 2500, errorType: OAuthException, errorMessage: Syntax error "Expected name." at character 33: id, first_name, last_name, email,}}
Code below:
fbLoginButton.setReadPermissions(Arrays.asList("pu blic_profile", "email"));
fbLoginButton.registerCallback(callbackManager, new FacebookCallback() {
@Override
public void onSuccess(LoginResult loginResult) {
Bundle parameters = new Bundle();
parameters.putString("fields", "id, first_name, last_name, email,");
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"me",
parameters,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
Log.i("LoginActivity", response.toString());
prepareFacebookData(response.getJSONObject());
}
}
).executeAsync();
}
@Override
public void onCancel() {
printToastMessage("Canceled");
}
@Override
public void onError(FacebookException error) {
printToastMessage(error.getCause().toString());
}
});


View Solution