B
B
bihim2017-06-19 22:15:26
Twitter
bihim, 2017-06-19 22:15:26

How to get a list of Twitter friends?

I use the package (gspade, how is it in Russian? package) twit.
The code

bot.get('friends/list', {screen_name: 'putin'}, function(err, data, response) {
  if(err) {
    console.log(err)
  } else {
    data.users.forEach(function(user) {
      console.log(user.name)
    })
  }
})

Returns only 20 friends. Where does this limitation come from and how to get the list correctly?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Philipp, 2017-08-25
@zoonman

https://dev.twitter.com/rest/reference/get/friends/list
Add parameter count=200 then use cursor. Pay attention to call limits.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question