Twitter: follow another user's followers
I want to follow all of a particular users followers on Twitter.
What's the best way of doing this?
I'd like to get all of their twitter usernames too.
I can program in any languag开发者_如何学编程e really (except Lisp!)
I'd suggest you take a look at the Twitter REST API, in particular GET followers/ids.
in pseudocode:
foreach follower in competitor.followers
me.follow(follower);
next
competitors.followers can be got via GET followers/ids
you can programatically follow a user via POST friendships/create
which will return details of the user followed which will probably let you get their twitter name, if not then you can get the details of the user from their id using GET users/lookup
Have a look at Net::Twitter
on CPAN
.
Have a look at the API guide, esp. the section about Friends & Followers
精彩评论