potomak / jquery-instagram

Instagram jQuery plugin
http://potomak.github.io/jquery-instagram/
MIT License
555 stars 143 forks source link

Set show to 20 and it shows 14 #14

Closed ghost closed 11 years ago

ghost commented 11 years ago

I have set the show to 20 and it only shows 14. Set it to show 2 and it only shows 1.

my version of your plugin. http://pastebin.com/iX4vjheA

potomak commented 11 years ago

Please create a new fiddle at http://jsfiddle.net/ with your code linking the latest jquery-instagram library.

ghost commented 11 years ago

The best way would be to link you to what I'm working on as I have edited the jquery-instagram file

http://flatterd.cleanly.co/

http://flatterd.cleanly.co/assets/js/instagram.js

potomak commented 11 years ago

Please post a fiddle to let me test your code in a controlled environment, I'm here to help about jquery-instagram, not about the whole app.

guirogieri commented 11 years ago

I have the same problem. Not showing all photos tagged. Have an issue on instagram.js file?!

potomak commented 11 years ago

Here's my test: http://jsfiddle.net/tzxE5/

ghost commented 11 years ago

From what I managed to get on console.log a few times. The script/plugin sometimes doesn't pass through the data along with the image.

On 2012-10-17 16:33, Giovanni Cappellotto wrote:

Here's my test: http://jsfiddle.net/tzxE5/ [1]

Reply to this email directly or view it on GitHub [2].

Links:

[1] http://jsfiddle.net/tzxE5/ [2] https://github.com/potomak/jquery-instagram/issues/14#issuecomment-9531766

guirogieri commented 11 years ago

sometimes, this ocurrs because some users use private photos.

ghost commented 11 years ago

That'll explain it, is there a way to exclude such images?

On 2012-10-17 16:44, guirogieri wrote:

sometimes, this ocurrs because some users use private photos.

Reply to this email directly or view it on GitHub [1].

Links:

[1] https://github.com/potomak/jquery-instagram/issues/14#issuecomment-9532216

guirogieri commented 11 years ago

I dont know. But try this in your ajax request.

if(res.data.length <  settings.show) {
    total = settings.show - res.data.length;
    next_url = res.pagination.next_url;
    functionTest(total, next_url);
}

And create this function to call the rest of images.

function functionTest(total, url)  {
    console.log("callback: "+url);
    $(".content").instagram({
        next_url : url, 
        show : total, 
        onComplete : function(photos, data) {
            testeGlobal = data.pagination.next_url
        }
    });
}
potomak commented 11 years ago

@guirogieri is right, thanks for pointing it out and see also https://groups.google.com/d/msg/instagram-api-developers/nKik4i8OYhw/l0HxXHvpnIAJ