Twitter API 1.1 用户图片和名称 [英] Twitter API 1.1 User Image and name

查看:40
本文介绍了Twitter API 1.1 用户图片和名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Twitter 提供了一个很棒的 1.0 API.我可以像这样抓取用户图像:

Twitter provided a great 1.0 API. I could grab an user image just like this:

http://api.twitter.com/1/users/profile_image/twitter

1.1 更新会免费提供这样的东西吗?还是 1.1 更新需要对用户图像和用户名进行身份验证?我注意到 docs 中没有等效的调用.

Does the 1.1 update give anything like this away for free? Or does the 1.1 update require authentication for a user image and user name? I noticed there is no equivalent call in the docs.

这不起作用:

 http://api.twitter.com/1.1/users/profile_image/twitter

推荐答案

您只能通过身份验证获取用户图像和用户名.如果您尝试使用 Abraham 的 twitteroauth 获取用户个人资料图片,那么我猜这 link 会帮助你.同样可以通过调用name对象获取用户名并显示.

You can only get the user image and user name with authentication. If you're trying to get the user profile image with Abraham's twitteroauth, then I guess this link will help you. You can get the user name similarly by calling the name object and display it.

这篇关于Twitter API 1.1 用户图片和名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆