是否可以获取 android 中 Twitter 用户的电子邮件地址?如果是,那么如何?

Is it possible to get email address of twitter user in android? If yes, then how?

我是 android 开发的新手。我使用以下代码访问我个人 Twitter 帐户的电子邮件地址,但它对我不起作用。
我正在使用这个代码:

TwitterAuthClient authClient = new TwitterAuthClient();

authClient.requestEmail(session, new Callback() {

    @Override
    public void success(Result result) {
        // Do something with the result, which provides the email address
    }

    @Override
    public void failure(TwitterException exception) {
      // Do something on failure
    }
});

请求用户的电子邮件地址要求您的应用程序被 Twitter 列入白名单。要请求访问权限,您可以访问

https://support.twitter.com/forms/platform.

有关更多信息,请参阅 twitter community 中发布的查询。

N.B : Even if the user grants access to her email address, it is not guaranteed you will get an email address. For example, if someone signed up for Twitter with a phone number instead of an email address, the email field may be empty. When this happens, the failure method will be called because there is no email address available.