Instagram Graph API中图像的缩略图 [英] Thumnails for images in Instagram Graph API
问题描述
我想问一下是否有任何方法可以获取从Instagram Graph API返回的媒体的缩略图?我可以使用以下端点获取图像URL:/{InstagramUserId}/media?fields = media_url
I'd like to ask if there is any way to get thumbnail image for media returned from Instagram Graph API? I can get an image URL by using following endpoint: /{InstagramUserId}/media?fields=media_url
但是,它仅返回一种尺寸.旧的Instagram API返回了各种大小,例如 low_resolution
, thumbnail
, standard_size
.使用Instagram Grahp API是否有可能获得相似的结果?
However it only returns one size. Old Instagram API returned various sizes like low_resolution
, thumbnail
, standard_size
. Is it possible to get similar result by using Instagram Grahp API?
推荐答案
寻找了一段时间的解决方案后,我终于找到了.
After searching for some time to a solution i finally found one.
因此,请在 fields
查询字符串中包含 permalink
字段,并且应提供以下内容(对不起,以Kim Kardashian为例):
So, include in the fields
query string the permalink
field and it should give as following (Sorry, for using Kim Kardashian as an example):
https://www.instagram.com/p/CAYDz52gSLh
然后将其附加在 media?size = t
的末尾,或者简单地将 media
附加如下:
then append this at the end media?size=t
or simply media
like this:
https://www.instagram.com/p/CAYDz52gSLh/media?size=t
-
media?size = t
将给出150x150像素的图像 -
media?size = m
将给出320x320 px的图像 -
media?size = l
将给出1080x1080 px的图像
media?size=t
will give a 150x150 px imagemedia?size=m
will give a 320x320 px imagemedia?size=l
will give a 1080x1080 px image
这篇关于Instagram Graph API中图像的缩略图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!