OAuth、Twitter 和 Indentity - 我是谁?

发布于 2024-11-26 07:12:10 字数 121 浏览 4 评论 0原文

通过 OAuth 对 Twitter 进行身份验证后,我没有看到一个好的调用来获取您的用户名。 这应该如何运作?我想撤回 Twitter 用户名、名字、姓氏等信息……基本的个人资料内容。 OAuth 握手是否应该给我我的用户名?

Once authenticated to Twitter via OAuth I did not see a good call to get your username.
How is this supposed to work? I'd like to pull back things like Twitter username, firstname, lastname, etc... basic profile stuff. Should the OAuth handshake give me my username?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

怪异←思 2024-12-03 07:12:10

试试这个:

https://dev.twitter.com/docs/api/1/get/account/verify_credentials

它会向您显示 OAuth 验证帐户的所有信息(您通常会从任何其他用户那里获得)=)!

Try this:

https://dev.twitter.com/docs/api/1/get/account/verify_credentials

It'll show you all information (you'ld normally get of any other user) of the OAuth-authenticated-account =)!

孤者何惧 2024-12-03 07:12:10

首先,Twitter 在访问令牌响应中包含 screen_name 参数。其次,您可以调用 http://api.twitter.com/1/account/verify_credentials。 json 获取完整的配置文件,其中还包括名称(JSON 键“名称”)。 Twitter 不提供电子邮件地址。

First, Twitter includes the screen_name parameter in the access token response. Second, you can call http://api.twitter.com/1/account/verify_credentials.json to get the full profile which will also include the name (JSON key 'name'). Twitter does not provide email addresses.

帅冕 2024-12-03 07:12:10

您是否尝试过这些?我已经尝试了几乎所有的 php 方法,并且我尝试的所有方法都有关于如何获取用户数据的示例。

Have you tried any of these libraries? I've tried just about all of the php ones and all that I tried had examples on how to get the user data.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文