拉Twitter的个人资料图片 [英] Pull twitter profile image

查看:161
本文介绍了拉Twitter的个人资料图片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个快速的方法来拉在PHP或JavaScript Twitter个人资料的形象?我需要得到完整的图像(不是头像大小)的URL。谢谢。任何code样品是不错的。

Is there a quick way to pull twitter profile image in PHP or Javascript? I need to get the url of the FULL image (not avatar size). Thanks. Any code sample is good.

推荐答案

微博中有的一个不错的简单的URL。

Twitter has had a nice simple URL.

<一个href=\"https://api.twitter.com/1/users/profile_image/abraham\">https://api.twitter.com/1/users/profile_image/abraham

它的大小选项,如?大小=做大

It has size options like "?size=bigger"

您可以阅读更多关于它在鲜为人知的Twitter和TwitterAPI技巧和窍门

You can read more about it on Little known Twitter and TwitterAPI tips and tricks.

微博目前拥有最多的文档作为让用户/ profile_image /:SCREEN_NAME

Twitter now has documentation up as GET users/profile_image/:screen_name.

更新:此方法的支持已经从API的1.1版中删除。 建议的做法前进是的 GET /用户/显示和缓存 profile_image_url 在当地的服务/应用程序。

Update: Support for this method has been removed from v1.1 of the API. Recommended practice going forward is GET /users/show and cache profile_image_url locally in your service/app.

这篇关于拉Twitter的个人资料图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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