twitter api get user email

前端 未结 4 1446
抹茶落季
抹茶落季 2021-01-11 12:31

I am curious to know how to authenticate the user with twitter and after successful login, i need the email of the user... how can it be done?

Heard that twitter doe

相关标签:
4条回答
  • 2021-01-11 13:10

    Check out this article and try this search.

    Twitter supports OAuth, and I am myself having trouble with it (I am writing a Python script app). A switch to xAuth is possible.

    "Mobile and desktop applications are also given the opportunity to use xAuth, a means to exchange a login & password for an access token. To use xAuth, send a request to api@twitter.com with plenty of details about your application and why xAuth is the best choice for it." - http://dev.twitter.com/pages/auth

    0 讨论(0)
  • 2021-01-11 13:23

    Late answer, but I hope it will help someone.

    There is no way to obtain the email from the API.

    See the doc there : Twitter doc

    Other post relating that : SO post

    The link provided in tarantinofan's answer is quite old, but the principles are there, as an explanation on how OAuth works.

    0 讨论(0)
  • 2021-01-11 13:26

    Just to update this issue, it is now possible (from April 2015).

    You can send a support ticket to Twitter to whitelist your app to make it possible to ask for an email. Then, after an user connects their account, you need to make a GET request to verify credentials with the "include_email" option set to true.

    It is explained in more detail in the second link.

    0 讨论(0)
  • 2021-01-11 13:35

    Twitter API cannot provide Email address so you cannot get it from twitter API (See Doc of twitter api) you can get it from user after log in or try another way

    0 讨论(0)
提交回复
热议问题