I am trying to use Parse.com on my Android Application to authenticate my users with Twitter.
Basically, I have a 'Register with Twitter' button. When the user presses this, the Twitter dialog opens, and he signs up. Here is the onClick() function for the Register With Twitter button:
public void registerTwitter(View view)
{
ParseTwitterUtils.logIn(this, new LogInCallback() {
@Override
public void done(ParseUser user, ParseException err) {
if (user == null) {
//do something else, User quit the dialog
}
else if (user.isNew())
{
Intent i=new Intent(getApplicationContext(),Welcome.class);
startActivity(i);
}
else
{
//User already exists, do something else
}
}
});
}
Here, the code is working, and there is a ParseUser being created in the back as intended. However, the problem is: how do I get the other public data from the Twitter API to add to my ParseUser object? Like First Name, Last Name, Image, Email etc?
All I get at the backend is a number in the 'Username' field, and the authData object from Twitter
Any help would be appreciated! Thank you