Skip to content

How do you fetch all followers #290

Description

@S-codes14

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)
};

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions