Instagram API自定义图像宽度

Bob*_*ban 7 php instagram

我正在尝试使用Instagram API为Instagram中的图像设置自定义宽度.我正在使用hashtag来获取所有相关的图像.我可以要求Instagram为我提供自定义图像尺寸吗?我知道有3种尺寸:缩略图,low_resolution,standard_resolution.这就是我能得到的一切吗?谢谢!

Wil*_*ter 14

Instagram API返回三种标准图像分辨率.还有一个额外的未记录的图像大小,你也可以使用,这可能在将来有点脆弱/可能的变化,也可能违反他们的服务条款(不确定).我注意到当我看到Instagram网站提供更高分辨率的图像时,这个图像是可用的 - 我不确定为什么Instagram会选择不提供此图像.

从API中,您可以获得以下标准图像大小:

缩略图(150 x 150)

https://scontent.cdninstagram.com/hphotos-xaf1/t51.2885-15/s150x150/e15/11821182_168255950173048_11130460_n.jpg

low_resolution(320 x 320)

https://scontent.cdninstagram.com/hphotos-xaf1/t51.2885-15/s320x320/e15/11821182_168255950173048_11130460_n.jpg

标准分辨率(640 x 640)

https://scontent.cdninstagram.com/hphotos-xaf1/t51.2885-15/s640x640/sh0.08/e35/11821182_168255950173048_11130460_n.jpg

然后,通过查看他们的网站,我注意到他们以1080 x 1080提供了更大版本的文件:

无证大图(1080 x 1080)

https://scontent.cdninstagram.com/hphotos-xaf1/t51.2885-15/s1080x1080/e15/11821182_168255950173048_11130460_n.jpg


Met*_*orp 4

只需搜索并替换 _5(或 _6,即)即可获得所需的大小(见下文):

\n\n

图像大小似乎是:

\n\n

http://distilleryimage7.s3.amazonaws.com/xxxxxxxxx_7.jpg

\n\n

612 像素 \xc3\x97 612 像素

\n\n

http://distilleryimage7.s3.amazonaws.com/xxxxxxxxx_6.jpg

\n\n

306 像素 \xc3\x97 306 像素

\n\n

http://distilleryimage7.s3.amazonaws.com/xxxxxxxxx_5.jpg

\n\n

150 像素 \xc3\x97 150 像素

\n\n

_8、_4、_3 似乎不是有效尺寸。

\n