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
I have a problem using instagram-node with Bluebird (promises library)
I make request to user_media_recent but chain .then (promise) not working.
In hdl function if before ruturn insert console.log(all) -> all fine with data.
Please, how can solve this issue.
Here is my code
var instagramApi = require('instagram-node').instagram();
var Bluebird = require('bluebird');
var all =[];
var hdl = function(err, medias, pagination, remaining, limit) {
for (var i in medias) {
all.push(medias[i].id);
}
if(pagination.next) {
pagination.next(hdl); // Will get second page results
}
else return all;
};
instagramApi.user_media_recentAsync('222728214',{count:10},hdl)
.then(function(data){
console.log(data);
});
The text was updated successfully, but these errors were encountered:
I have a problem using instagram-node with Bluebird (promises library)
I make request to user_media_recent but chain .then (promise) not working.
In hdl function if before ruturn insert console.log(all) -> all fine with data.
Please, how can solve this issue.
Here is my code
The text was updated successfully, but these errors were encountered: