Hi Matt,
The responses you are getting are because the user you are executing
as is already a friend of 'topperge'. I have this on the todo list to
raise a more appropriate exception instead of a Forbidden.
If you do the following around friend(:add, ...) or friend(:remove,
....) calls on the client you can cater for these cases:
begin
client.friend(:add, supposed_new_friend)
rescue Twitter::RESTError => re
unless re.code == "403"
# put code to handle case where Forbidden error is not raised
because you probably shouldn't ignore that case
end
end
The same is true when you are trying to do a friend(:remove, ....) on
a username that you are not already friends with. Right now Twitter4R
library only returns exactly what the Twitter.com API returns, but as
I said earlier this is on the todo list to for me to tidy up the
library after I reorganize the code a little.
Thanks and hope this helps and explains the issue,
Susan