2

I am following this tutorial. I need the email id of the user. The result of my code is zero.

 TwitterAuthClient authClient = new TwitterAuthClient();
        authClient.requestEmail(session, new Callback<String>() {
            @Override
            public void success(Result<String> result) {
                // Do something with the result, which provides the email address
                Log.d(TAG,"result = "+result);
            }

            @Override
            public void failure(TwitterException exception) {
                // Do something on failure
                Log.d(TAG,"exception = "+exception);
            }
        });

official documentation

Andy Piper
  • 11,422
  • 2
  • 26
  • 49

2 Answers2

2

please make sure you have following additional permission enabled in your Twitter app setting enter image description here

Shubham AgaRwal
  • 4,355
  • 8
  • 41
  • 62
0

Your twitter application needs to be white listed from twitter.

Swapnil
  • 654
  • 7
  • 27
  • this process is not working... i have completed all process which is written doc.. but api gave response .Your application may not have access to email addresses or the user may not have an email address. To request access, please visit https://support.twitter.com/forms/platform. – Muhammad Waleed Aug 11 '16 at 11:03
  • @MuhammadWaleed you need to write mail to twitter support mentioned in docs, and within 24hrs your app will get white listed. – Swapnil Aug 11 '16 at 11:45