- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在阅读 Twitter 文档 https://dev.twitter.com/overview/general/user-profile-images-and-banners并明确指出:
Alternative image sizes for user profile images You can obtain a user’s most recent profile image, along with the other components comprising their identity on Twitter, from GET users/show. Within the user object, you’ll find the profile_image_url and profile_image_url_https fields. These fields will contain the resized “normal” variant of the user’s uploaded image. This “normal” variant is typically 48px by 48px.
By modifying the URL, you can retrieve other variant sizings such as “bigger”, “mini”, and “original”. Consult the table below for more examples:
Variant Dimensions Example URL normal 48px by 48px http://pbs.twimg.com/profile_images/2284174872/7df3h38zabcvjylnyfe3_normal.png https://pbs.twimg.com/profile_images/2284174872/7df3h38zabcvjylnyfe3_normal.png bigger 73px by 73px http://pbs.twimg.com/profile_images/2284174872/7df3h38zabcvjylnyfe3_bigger.png https://pbs.twimg.com/profile_images/2284174872/7df3h38zabcvjylnyfe3_bigger.png mini 24px by 24px http://pbs.twimg.com/profile_images/2284174872/7df3h38zabcvjylnyfe3_mini.png https://pbs.twimg.com/profile_images/2284174872/7df3h38zabcvjylnyfe3_mini.png original original http://pbs.twimg.com/profile_images/2284174872/7df3h38zabcvjylnyfe3.png https://pbs.twimg.com/profile_images/2284174872/7df3h38zabcvjylnyfe3.png Omit the underscore and variant to retrieve the original image. The images can be very large.
{
....
"profile_image_url_https" = "https://pbs.twimg.com/profile_images/559415382457348097/qSYxxIAo_normal.png";
...
}
_normal
后缀,然后试试这个 URL:
_400x400.[jpg|png]
似乎也有效,但它没有记录且不可靠,所以我真的怀疑我是否应该在生产中使用这个未记录的 API。
最佳答案
对我来说,“解决方法”的解决方案是从字符串的末尾删除“_normal”
看看下面:
关于twitter - 如何在 Twitter 上获取用户的高分辨率个人资料图片?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34761622/
我是一名优秀的程序员,十分优秀!