Hi, i’m currently developing app which provide twitter login button then i tried to upgrade my twitter sdk to the latest so that i followed the documentation here https://dev.twitter.com/twitterkit/android/installation.
However i’m still unable to get any respond when i click the button. Please help…!!!
Here’s my code in activity
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_login);
ButterKnife.bind(this);
mAuth = FirebaseAuth.getInstance();
mLoginButton.setBackground(ContextCompat.getDrawable(getApplicationContext(), R.drawable.round_shape));
mLoginButton.setCallback(new Callback<TwitterSession>() {
@Override
public void success(Result<TwitterSession> result) {
// Do something with result, which provides a TwitterSession for making API calls
}
@Override
public void failure(TwitterException exception) {
// Do something on failure
}
});
}
And here’s inside my application class
private static final String TWITTER_KEY = “OpOazfBSbr5ZeOY4VNQB53Sck”;
private static final String TWITTER_SECRET = “EIl6tBaiSY1rDZfOrnhC2M7suajM5XF2CdTm4rVx1EdFnaHv58”;
@Override
public void onCreate() {
super.onCreate();
final TwitterConfig config = new TwitterConfig.Builder(this)
.logger(new DefaultLogger(Log.DEBUG))
.twitterAuthConfig(new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET))
.debug(true)
.build();
Twitter.initialize(config);
}