I have an issue with Facebook login in Android using Parse. Everything is working fine but I always get User logged in through Facebook.
I found a guy with the same problem here Facebook Login not working properly (Parse) but his answer doesnt work for me.
List<String> permissions = Arrays.asList("email");
ParseFacebookUtils.logIn(permissions, getActivity(), new LogInCallback() {
@Override
public void done(ParseUser user, ParseException err) {
if (user == null) {
Log.d("WelcomeMainFragment",
"Uh oh. The user cancelled the Facebook login.");
} else if (user.isNew()) {
Log.d("WelcomeMainFragment",
"User signed up and logged in through Facebook!");
} else {
Log.d("WelcomeMainFragment",
"User logged in through Facebook!");
}
}
});
user.isNew()
always returns false! even with new facebooks accounts in my app.
I need to have working isNew() method to be able to create parse users for first time in that block of code.
Thanks a lot.