Reputation: 505
I have successfully gotten a bunch of Twitter user_ids using the Twitter API resource "GET friends/ids".
I need to be able to get all screen names from Twitter without hitting the rate limit. I know I can use "GET friendships/show" to get the "screen_name", but to do that, I would have to loop through all of the user_ids, each one being a request, thereby potentially hitting the rate limit.
Does anyone know of a way to send an array of user_ids, in one request? Or... any other ideas or methods?
Upvotes: 2
Views: 1026
Reputation: 529
You can use the users/lookup API? I believe you can send a list of upto 100 userids in one request and it will send back a fair bit of info about each one, including their last tweet. As it says in the docs
It's also well suited for use in tandem with friends/ids and followers/ids.
I think this will solve your problem.
Upvotes: 3