user8715867
user8715867

Reputation: 23

Twitter API : how to know if I am following someone

To follow someone I use api.create_friendship(user_id) and this method call is in a try statement. So I was thinking it will raise an error if I was already following the user but it doesn’t. This because .create_friendship(user_id)... explanation Ok I can’t detect it with an error handler so how ?! Knowing that user[« following »] is deprecated by the twitter API doc...

Upvotes: 0

Views: 547

Answers (1)

Terence Eden
Terence Eden

Reputation: 14324

As per the documentation there is an API call to see if you are following someone.

Use friendships/show to determine if you are already following a user.

Upvotes: 1

Related Questions