Quantcast
Channel: Active questions tagged instafeedjs+jquery+javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 32

Sort images by most recent and filter for images with likes > x

$
0
0

In instafeed.js, I have the ability to sortBy tagged pictures either by most-liked or most-recent. Those options are mutually exclusive. I am trying to find a middle ground to do both. I would like to sort by most-recent and then display those that have likes > x amount. How can I achieve this in instafeed.js?

var feed = new Instafeed({
  target: 'instafeed',
  get: 'tagged',
  tagName: 'dog',
  limit: '10',
  sortBy: 'most-recent',
  resolution: 'standard_resolution',
  clientId: 'xxxxx', 
  template:'<div class="tile"><div class="text"><b>{{likes}} &hearts; </b>{{model.user.full_name}}</div><img class="item" src="{{image}}"></div>',
  filter: function(image) {
    //filter for recent images with most like
  }
});

Viewing all articles
Browse latest Browse all 32

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>