I am using instafeed.js to display Instagram images on my homepage.
I got 1000+ images I would like to sortby most-liked and load 60 at a time.
When I use "sortBy: most-liked" it looks like instafeed.js loads the 60 recent images and then sort these 60 by most-liked. When I load the next 60 images I get the next 60 recent images and these sorted by most liked.
It looks like it is not posible to sort all 1000+ images by most-liked. And then load 60 at a time?
Is this how instafeed.js works? Or is it a bug?
<script type="text/javascript">
var feed = new Instafeed({
sortBy: 'most-liked',
get: 'tagged',
tagName: 'awesome',
clientId: 'YOUR_CLIENT_ID'
});
feed.run();
</script>
Kind regards
答案 0 :(得分:0)
据我所知,目前instafeed支持最多加载60张图像。但是有一种方法可以加载更多图像并按照您的要求显示它们,并且它需要一些代码工作。
首先需要按照以下步骤操作;
<script src="http://sriajith.info/wp-content/uploads/2015/05/instafeed.min_.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="instaFeedButton">
<button id="next-feeds" class="btn-feed">Next</button>
</div>
<br/> <br/>
<div id="instafeed" class="instagramFeed"></div>
&#13;
{{1}}&#13;
如果您想添加分页,可以在here
找到一些信息