1

I loggedIn in parse using ParseTwitterUtils:

ParseTwitterUtils.logIn(this, new LogInCallback()
    {
        @Override
        public void done(ParseUser user, ParseException err)
        {
            if(user == null)
            {
                Log.d(TAG, "Uh oh. The user cancelled the Twitter login.");
            }
            else if(user.isNew())
            {
                Log.d(TAG, "User signed up and logged in through Twitter!");
                navigateToMainActivity();
            }
            else
            {
                Log.d(TAG, "User logged in through Twitter!");
                Log.d(TAG, "user id=" + user.getObjectId());
                Log.d("TAG", "username=" + user.getUsername());
                navigateToMainActivity();
            }
        }
    });

I logout the user using:

ParseUser.logOut();

However when I try to login again using ParseTwitterUtils, I am presented with webView with only Authorize app button. After pressing Authorize app, I get non-null user in done method but all other fields of the user are null, e.g userId, username, etc. I think app is authorizing the twitter locally and thus not bringing the user from Parse. How can I force Parse to clear twitter session info on logout or how can I get right user in ParseTwitterUtils.login without doing this?

SohailAziz
  • 8,034
  • 6
  • 41
  • 43

1 Answers1

0

I was experiencing this issue because I have enabled Parse local datastore in application class

Parse.enableLocalDatastore(this);

I just disabled the Parse local datastore and Twitter login is working perfectly.

SohailAziz
  • 8,034
  • 6
  • 41
  • 43