Considering the set of Twitter users "nodes" and the relation u follows v
as the "edges", we have a graph from which I would like to select a subset of the users at random. I could be wrong, but from reading the API docs I think it's impossible to get a collection of users except by getting the followers or friends of an already-known user.
So, starting from myself and exploring the Twitter graph from there, what's a good way to select a random sample of (say 100) users?
I would use the numerical user id
. Generate a bunch of random numbers, and fetch users based on that. If you hit a nonexistent id, simply skip that.
The Twitter API wiki, for users/show:
id. The ID or screen name of a user.