title: How to get user data after login with Twitter API
body: <p>I used Twitter API to do a simple login with twitter to get a few of the user's data. In the <a href="https://ton.twimg.com/dtc/181b426f-2a88-4718-90bb-cb8296b91c60/twitterkit/android/javadocs/twitter-core/index.html" rel="nofollow noreferrer">javaDocs</a>, there's a User model which contains all the info for a user. I want access to these data. I just can't figure out how to actually get them.!?</p>
  
  <p><strong>My code:</strong></p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
    public TwitterLoginButton loginButton;
  
    @Override
    protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      Twitter.initialize(this);
  
      TwitterConfig config = new TwitterConfig.Builder(this)
          .logger(new DefaultLogger(Log.DEBUG))
          .twitterAuthConfig(
              new TwitterAuthConfig(getString(R.string.com_twitter_sdk_android_CONSUMER_KEY),
                  getString(R.string.com_twitter_sdk_android_CONSUMER_SECRET)))
          .debug(true)
          .build();
      Twitter.initialize(config);
      setContentView(R.layout.activity_main);
  
      loginButton = (TwitterLoginButton) findViewById(R.id.login_button);
      loginButton.setCallback(new Callback&lt;TwitterSession&gt;() {
        @Override
        public void success(Result&lt;TwitterSession&gt; result) {
          // Do something with result, which provides a TwitterSession for making API calls
          Log.i("Twitter response  ", result.data.getUserName());
         }
  
        @Override
        public void failure(TwitterException exception) {
          // Do something on failure
        }
      });
    }
  
  
    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
      super.onActivityResult(requestCode, resultCode, data);
  
      // Pass the activity result to the login button.
      loginButton.onActivityResult(requestCode, resultCode, data);
  
      for (String key : data.getExtras().keySet()) {
        Log.d("Bundle Debug", key + " = \"" + data.getExtras().get(key) + "\"");
      }
  
    }
  </code></pre>
  
  <p><strong>The logcat</strong> </p>
  
  <pre><code>// logcat: Bundle Debug log 
   user_id = "519****"
   screen_name = "Alaa****"
   tk = "519644856************************"
   ts = "s0RkdolPk************************"
  </code></pre>