OAuth、Twitter 和 Indentity - 我是谁?
通过 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
试试这个:
它会向您显示 OAuth 验证帐户的所有信息(您通常会从任何其他用户那里获得)=)!
Try this:
It'll show you all information (you'ld normally get of any other user) of the OAuth-authenticated-account =)!
首先,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.
您是否尝试过这些库?我已经尝试了几乎所有的 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.