Email of Twitter User in Twitter4j

2019-02-23 08:37发布

问题:

Can twitter4j get the email of twitter users authorizing an application/web site.

I was able to get the screen name as below:

User user = twitter.showUser(id);
String screenName = user.getScreenName();

How about the email? Is it possible?

Thanks.

回答1:

You can get the user details using the below API: http://api.twitter.com/1/users/lookup.xml?user_id=YOUR_USER_ID

Twitter says it doesn't provide any API for email retrieval. https://dev.twitter.com/docs/faq#6718