我们可以从 Twitter oauth API 获取电子邮件 ID 吗?

2021-12-25 00:00:00 twitter php twitter-oauth

如何获取接受我的 Twitter 申请的用户的电子邮件 ID?

How to get email id of the user who accepted my Twitter application?

我浏览了很多论坛.但他们已经提到,这是不可能的.这些帖子也超过一年.我可以知道是否可以使用 PHP 通过 Twitter API 获取用户电子邮件 ID?

I have gone through lot of forums. But they have mentioned, it is not possible. Also those posts are older than a year. May I know whether it is possible to get the user email id through twitter API using PHP?

我正在使用以下 URL 获取 Twitter 用户详细信息:

I am getting Twitter user details using the following URL:

https://api.twitter.com/1.1/account/verify_credentials.json

推荐答案

现在可以通过填写表单来请求 提升权限:

This is now possible by filling out a form to request elevated permissions:

  1. 转到https://support.twitter.com/forms/platform
  2. 选择我需要访问特殊权限"
  3. 输入应用程序名称和 ID.这些可以通过 https://apps.twitter.com/ 获得——应用程序 ID 是浏览器地址栏中的数字部分点击您的应用后.
  4. 权限请求:电子邮件地址"
  5. 提交&等待回复
  6. 在您的请求获得批准后,会在您的 twitter 应用的权限"部分中添加一个附加权限设置.转到其他权限",然后选中从用户处请求电子邮件地址"复选框.
  1. Go to https://support.twitter.com/forms/platform
  2. Select "I need access to special permissions"
  3. Enter Application Name and ID. These can be obtained via https://apps.twitter.com/ -- the application ID is the numeric part in the browser's address bar after you click your app.
  4. Permissions Request: "Email address"
  5. Submit & wait for response
  6. After your request is granted, an addition permission setting is added in your twitter app's "Permission" section. Go to "Additional Permissions" and just tick the checkbox for "Request email addresses from users".

请注意,用户电子邮件地址必须经过验证,否则 Twitter 拒绝提供.(请参阅提升权限文档页面中的include_email参数说明.)

Note that user e-mail address has to be verified, otherwise Twitter refuses to provide it. (See include_email parameter description in elevated permissions doc page.)

相关文章