Failed to get request token




TwitterConfig config = new TwitterConfig.Builder(this)
.logger(new DefaultLogger(Log.DEBUG))
.twitterAuthConfig(new TwitterAuthConfig(getString(R.string.CONSUMER_KEY), getString(R.string.CONSUMER_SECRET)))

_btnTwitter.setCallback(new Callback() {
public void success(Result result) {
// Do something with result, which provides a TwitterSession for making API calls

            TwitterSession session = TwitterCore.getInstance().getSessionManager().getActiveSession();
            TwitterAuthToken authToken = session.getAuthToken();
            String token = authToken.token;
            String secret = authToken.secret;


        public void failure(TwitterException exception) {
            // Do something on failure
            Toast.makeText(getApplicationContext(), "Authentication failed!", Toast.LENGTH_LONG).show();


Have you declared your callback URLs? If not, here’s more info below:

Last month we announced a new requirement that any developer using Sign in with Twitter must explicitly declare their callback URLs in a whitelist on by June 12th. You can whitelist all of your callback URLs in your app settings on – follow this link to the documentation which will guide you through the quick process of enabling this.


yes, this is my callback Url