Displaying more than 20 photos in instagram API

PhDeOliveira picture PhDeOliveira · Sep 7, 2012 · Viewed 46.5k times · Source

I've been doing some research and trying to figure out how to display more then 20 images that are being pulld in from the instagram api. I'm pretty new at this so any help would be appreciated! Just trying to see if there are any work arounds? Saw something about adding pagination that could possibly help.. if thats the case details on how to do that would be great too!

Here's the code I have so far.

<script type="text/javascript">
    $.ajax({
        type: "GET",
        dataType: "jsonp",
        cache: false,
        url: "https://api.instagram.com/v1/tags/coffee/media/recent?client_id=[]&access_token=[]",
        success: function(data)  {
            for (var i = 0; i < 20; i++) {
                $(".instagram").append("<a class='big-square span2' target='_blank' href='" + data.data[i].link +"'><img src='" + data.data[i].images.low_resolution.url +"'></img></a>");
            }
        }
    });
</script>

Answer

tcd picture tcd · Sep 11, 2012

Instagram has a 20 image limit on their API, check out this thread and my answer:

What is the maximum number of requests for Instagram?

EDIT: also, have a look at THIS