Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do you fetch all followers #290

Open
S-codes14 opened this issue Jun 1, 2022 · 0 comments
Open

How do you fetch all followers #290

S-codes14 opened this issue Jun 1, 2022 · 0 comments

Comments

@S-codes14
Copy link

I'm sorry, I even sound stupid asking this, but how do you fetch all the users following the user, I have tried to implement it but only get 47 users back:

exports.instagram = async (username1) => {
  await client.login();
  const user = await client.getUserByUsername({ username: username1 });
  // first: user.edge_followed_by.count
  const followers = await client.getFollowers({
    userId: user.id,
    first: user.edge_followed_by.count,
  });
  const data = followers.data

  t = data.map((follower) => {
    return(follower.username)
   });
   console.log(t.length)
   return(t)
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant