Android : Twitter login not showing screen in Parse.com Android?

on Thursday, January 29, 2015


I create Parse.com application and create Twitter Application as well. I updated Consumer and Consumer Secret key in Parse application.


I wrote following code:


onCreate() of Application:



Parse.initialize(this, APPLICATION_KEY_PARSE, CLIENT_KEY_PARSE);
ParseTwitterUtils.initialize("Consumer_key", "consumer_secret_key");


This my code on Twitter Button login:



twitterLogin.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
ParseTwitterUtils.logIn(MainActivity.this, new LogInCallback() {
@Override
public void done(ParseUser user, ParseException err) {
if (user == null) {
Log.d("MyApp",
"Uh oh. The user cancelled the Twitter login.");
} else if (user.isNew()) {
Log.d("MyApp",
"User signed up and logged in through Twitter!");
} else {
Log.d("MyApp", "User logged in through Twitter!");
}
}
});

}
});


But when i click button it shows loading but doesnt Twitter login. Please help.


0 comments:

Post a Comment