拉推特头像 [英] Pull twitter profile image

查看:33
本文介绍了拉推特头像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种快速的方法可以在 PHP 或 Javascript 中提取 Twitter 个人资料图片?我需要获取完整图像的 url(不是头像大小).谢谢.任何代码示例都很好.

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.

推荐答案

Twitter 一个简单的 URL.

Twitter has had a nice simple URL.

https://api.twitter.com/1/users/profile_image/abraham

它有像?size=bigger"这样的尺寸选项

It has size options like "?size=bigger"

您可以在 鲜为人知的 Twitter 上阅读更多相关信息和 TwitterAPI 提示和技巧.

Twitter 现在将文档列为 GET users/profile_image/:screen_name.

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

更新:已从 API 的 v1.1 中删除对此方法的支持.推荐做法GET/users/show 并将 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.

这篇关于拉推特头像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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