Instagram-private-api: How to use Feed api's ?

Created on 22 Jun 2016  路  2Comments  路  Source: dilame/instagram-private-api

Can you give me an example. Thanks

question

Most helpful comment

every feed take session an extra arguments,

// import Client as Client.V1 and make session (how to in README)
var userId = 12345....;
var feed = new Client.Feed.UserMediaFeed(session, userId);
// every feed should have method .get() which usually take no arguments
feed.get()
  .then(function(data){ 
      console.log(data, "you just got first page");
      return feed.get()
   })
   .then(function(data) {
      console.log(data, "you just got second page")
   })

further more, feed also in many cases implements setMaxId, getMaxId, isMoreAvailable
methods which can help you to set the cursor. And also few feeds have all method which can return for example all messages in inbox or all followings etc.

All 2 comments

every feed take session an extra arguments,

// import Client as Client.V1 and make session (how to in README)
var userId = 12345....;
var feed = new Client.Feed.UserMediaFeed(session, userId);
// every feed should have method .get() which usually take no arguments
feed.get()
  .then(function(data){ 
      console.log(data, "you just got first page");
      return feed.get()
   })
   .then(function(data) {
      console.log(data, "you just got second page")
   })

further more, feed also in many cases implements setMaxId, getMaxId, isMoreAvailable
methods which can help you to set the cursor. And also few feeds have all method which can return for example all messages in inbox or all followings etc.

just info, i tried to use new Client.Feed.UserMediaFeed(session, userId);
but error so this is the correct way

    var userId = account.id;
    var feed = new Client.Feed.UserMedia(session, userId);
    feed.get().then(function(data) {
        console.log(data)
    })
Was this page helpful?
0 / 5 - 0 ratings

Related issues

kvcpr picture kvcpr  路  4Comments

hazratgs picture hazratgs  路  4Comments

kodmapdev picture kodmapdev  路  4Comments

RAwebdevla picture RAwebdevla  路  3Comments

Radzhab picture Radzhab  路  3Comments