Instagram 的最大请求数是多少? [英] What is the maximum number of requests for Instagram?

查看:26
本文介绍了Instagram 的最大请求数是多少?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道您可以返回的标记图像数量是否有限制?

I was wondering if there is a limitation of the number of images that are tagged that you can return?

这是我的代码:

<script type="text/javascript">
$(function() {
$.ajax({
    type:'GET',
    dataType:'jsonp',
    cache: false,
    url:'https://api.instagram.com/v1/tags/[TAG NAME]/media/recent?client_id=[CLIENT ID]',
    success: function(data) {
        for (var i = 0; i < 50; i++) {
        $(".pics").append("<li><a target='_blank' href='" + data.data[i].link +
        "' class='upshot-instagram' rel='instagram-group'><img src='" + data.data[i].images.thumbnail.url +"' ></img></a></li>");
        }
    }
});
});
</script>

我有 50 个返回,但我只收到 20 个图像返回给我.我知道我们有超过 250 个已被标记.

I have 50 returning but I am only getting 20 images coming back to me. I know we have over 250 that have been tagged.

推荐答案

API 每次调用只会返回 20 个图像.这是分页数据派上用场的地方,你可以使用Instagram API提供的MAX_ID,阅读更多此处.

The API will only return 20 images per call. This is where the pagination data will come in handy, you can use the MAX_ID provided by the Instagram API, read more here.

这是在 PHP 和 jQuery 中,但它可以帮助您走上正轨:加载更多示例

This is in PHP and jQuery, but it can help you get on the right track: load more example

这篇关于Instagram 的最大请求数是多少?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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