问题描述
限时送ChatGPT账号..有没有一种快速的方法可以在 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/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屋!
更多推荐
[db:关键词]
发布评论