我使用Instagram节点模块遇到问题,我无法获得所有媒体...有一个限制,我不想要这个限制,我想得到所有当前用户的媒体...
我的代码:
self.api.user_media_recent(userId, function(err, medias, pagination, remaining, limit){
console.log(medias.length); // only 35... should be 200 or something like that...
medias.forEach( function(media){
var url = media.images.thumbnail.url;
});
response.render('home/photos', {medias: medias, type: request.query.state});
});
答案 0 :(得分:3)
根据documenation,结果是分页的,您需要执行以下操作:
var hdl = function(err, result, pagination, remaining, limit) {
// Your implementation here
if(pagination.next) {
pagination.next(hdl); // Will get second page results
}
};
ig.tag_media_recent('test', hdl);