Hello everybody. I'm having an issue with the limit property. It's set to 60 and filters with a hashtag. The problem is that it's only showing the last 5 images with that hashtag. I'm aware that instafeed only searches images with such hashtag on the last 60 posts, but currently, there are a lot more than 5 in the 60 most recent ones.
Here is the code I'm using:
<script type="text/javascript">
var recentFeed = new Instafeed({
get: 'user',
target: 'recent',
userId: XXXX,
clientId: 'XXXX',
accessToken: 'XXXX',
sortBy: 'most-recent',
resolution: 'standard_resolution',
limit: 60,
filter: function(image) {
return image.tags.indexOf('contrapitos') >= 0;
},
template: '<div class="col-6 col-sm-3 mb-3"> <div class="instaphoto recent" style= "background-image: url({{image}});"> <a href="{{link}}" target="_blank" class="full-link"> </a> <div class="overlay"> <img src="img/like-white.png" style="margin-right: 5px; width: 30px;"> <p> {{likes}} </p> <img src="img/comment-white.png" style="margin-right: 5px; width: 30px;"> <p> {{comments}} </p> </div> </div> </div>'
});
recentFeed.run();
</script>
Is anybody having similar problems or can anybody give me a hand with this? Maybe i'm missing something.
Thanks!
The limit on Instagram's end is actually 20.
No matter what you'll put above 20, Instafeed will get the last 20 posts of your account, and then only show the ones with the hashtag "contrapitos". I guess you only had 5 with this hashtag in your last 20 posts
Instagram's limit should be put in the Instafeed.js docs. (I ended up here as I was about to post the same problem after checking the docs for anything about limits and not finding anything.)
This issue has been automatically marked as stale because it hasn't had new comments in the last 3 months. It will be closed if no further activity occurs. If you still need assistance with this issue, or believe it shouldn't be closed, please respond with a new comment to let us know.
Thank you all for your contributions.
Most helpful comment
Instagram's limit should be put in the Instafeed.js docs. (I ended up here as I was about to post the same problem after checking the docs for anything about limits and not finding anything.)