限制返回的图片少于20个Instagram API [英] Limit images returned less than 20 Instagram API

查看:44
本文介绍了限制返回的图片少于20个Instagram API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个朋友帮我做的小脚本.我只想从API返回10张图片.这是使用instagram精选图片链接到我的 instagram api示例的链接.

I have a small script a friend has helped me with. I only want to return 10 images from the API. Here is a link to my instagram api example using the featured images from instagram.

正如我所提到的,有人帮助我将其组合在一起,但我不是很先进,因此很难自己弄清楚.我已经搜索了stackoverflow和google.但是大多数帖子都希望显示超过20个限制.

As I mentioned someone has helped me put this together, I am not very advanced so figuring it out on my own is difficult. I have searched stackoverflow, and google. But most posts want to display more than the 20 limit.

如果任何人都有一些指向我可以阅读的链接,我将很高兴这样做!

If anyone has some links to where I can read up on this, I would be glad to do so!

谢谢克莱顿

推荐答案

您正在寻找的是count参数.更改此行:

What you are looking for is the count parameter. Change this line:

var apiUrl = "https://api.instagram.com/v1/media/popular?client_id=" + client_id + "&callback=?"

收件人:

var apiUrl = "https://api.instagram.com/v1/media/popular?client_id=" + client_id + "&callback=?&count=10"

这篇关于限制返回的图片少于20个Instagram API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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