instafeedjs - Instafeed get by tag for userId -
i want filter photos instafeed using userid + tag filter. gallery each page on website. wrote filter solution this
var feed = new instafeed({ userid: '1592060535', accesstoken: 'token', get: 'user', limit: 20, sortby: 'most-recent', resolution: 'standard_resolution', template: '<li><a data-lightbox="roadtrip" data-title="{{caption}}" href="{{image}}"><img src="{{image}}" /></a><p class="stats"><i class="fa fa-heart" aria-hidden="true"></i> {{likes}}</p><p class="stats"><i class="fa fa-comment" aria-hidden="true"></i> {{model.comments.count}}</p></li>', filter: function(image) { return image.tags.indexof('<?=$keyword?>') >= 0; }, after: function() { var isempty = document.getelementbyid('instafeed').innerhtml === ""; if(!isempty){ document.getelementbyid('insta-preview').style.display = 'block'; } }); feed.run();
but filter first 20 photos, need somehow load feed.next() , filter again.
Comments
Post a Comment