To get a list of who follows me, I know that I can use:
twitter = Twython(CONSUMER_KEY,CONSUMER_SECRET,ACCESS_KEY,ACCESS_SECRET)
followers = twitter.get_followers_ids(screen_name = "my_username")
but how do I get a list of who I follow?
答案 0 :(得分:0)
While writing this question I was flicking between bits of code trying to work out how to do this, and the answer was painfully simple.
I thought I'd still post this question and answer it myself to perhaps save people some time if they happened to have the same question.
In the line:
followers = twitter.get_followers_ids(screen_name = "my_username")
Just change 'followers' to 'friends', like so:
followers = twitter.get_friends_ids(screen_name = "my_username")
The only confusion in getting to this solution was that I didn't know that on Twitter 'friends of [user]' is actually 'people who [user] follows'.