You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can use instagram's native method to paginate by passing options object before callback function.
Example:
functionloadUserMedia(){API.user.self.media({count: 13},function(response){parseMedia(response);});}functionparseMedia(response){if(response.meta.code!==200)error(response);if(response.data.length==0)return;varlastMediaID,loadMoreBtn=$(/** **/);for(vari=0,media;media=response.data[i];i++){lastMedia=media.id;if(media.type=="video")continue;// remove if you want videos// do your own stuffimages.add(/** **/);}if(response.pagination&&response.pagination.next_max_id!==undefined){loadMoreBtn.removeClass('hidden');loadMoreBtn.off('click').on('click.instagram.user.loadMore',function(e){e.preventDefault();$(this).addClass('loading');API.user.self.media({count: 13,max_id: lastMedia},function(response){parseMedia(response);});});}}
Is there a way to use pagination?
I'm trying to get all users who liked an item of media, is it just undocumented or not possible?
The text was updated successfully, but these errors were encountered: