If I am looking to create a following graph based off 10,000 users, and am first looking to see if who of each of these users follows eachother, Would it be impossible to do this using the standard rates for getting a followers list? and is there anyway to get the user id by the screen name as I didn’t receive the user id for the set of tweets I hydrated.

Any help would be appreciated, sorry if the question is unclear

1 Like

To get full user objects from either a list of screen_names or user_ids you can use: GET users/lookup | Docs | Twitter Developer Platform (you can look up 100 screen_names per call, so 10,000 users won’t take long at all)

To get the following graph might take much more time, but given the list of user objects you can optimise:

You can budget and not paginate through all followers and only take the last 5000 (1 call to GET followers/ids | Docs | Twitter Developer Platform per user)

You can remove all users with < 100 followers or > 10,000 (or some other threshold) for example.

Using both the user context and app only authentication will double your capacity.

Given user objects and follower counts, you can also use GET followers/list | Docs | Twitter Developer Platform to get 200 followers at a time - but this returns user objects instead of IDs.

Applying the same for friends/ endpoints should get you the full directed following graph.

2 Likes

I will have a go using these tips, thank you!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.