Reputation: 23
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)
...
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
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