Failed to get request token

android

#1

Twitter.initialize(this);

TwitterConfig config = new TwitterConfig.Builder(this)
.logger(new DefaultLogger(Log.DEBUG))
.twitterAuthConfig(new TwitterAuthConfig(getString(R.string.CONSUMER_KEY), getString(R.string.CONSUMER_SECRET)))
.debug(true)
.build();
Twitter.initialize(config);

_btnTwitter.setCallback(new Callback() {
@Override
public void success(Result result) {
// Do something with result, which provides a TwitterSession for making API calls
Log.d(TAG,result.data.getUserName());

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

            Log.d(TAG,token);
        }

        @Override
        public void failure(TwitterException exception) {
            // Do something on failure
            Log.e(TAG,exception.toString());
            Toast.makeText(getApplicationContext(), "Authentication failed!", Toast.LENGTH_LONG).show();
        }
    });

#2

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 apps.twitter.com by June 12th. You can whitelist all of your callback URLs in your app settings on apps.twitter.com – follow this link to the documentation which will guide you through the quick process of enabling this.


#3

yes, this is my callback Url http://www.mandywebdesign.com