Colleagues, I would like to ask for your advice.
I'm experimenting with Twitter API in a paradigm rails-app. Scheme of the application:
- get all the followers in array
- get all friends in array
- compare the two arrays and get lists of accounts for Follow and Unfollow
Much is unclear to me. For example.
Take a look, please. At the level of Twitter, these requests, probably, require the same resources:
Code:
client.follow("sferik")
client.unfollow("sferik")
Unfollowing works without problems:
But for Follow I have to take a rescue for the application (Twitter::Error::TooManyRequests) every 10 to 15 minutes:
Sometimes Follow does not work at all (this can last a day or more), and the log looks like this:
Code:
rescue Twitter::Error 2018-02-15 21:31:39 +0300
rescue Twitter::Error 2018-02-15 21:46:52 +0300
rescue Twitter::Error 2018-02-15 22:01:12 +0300
I do not understand the algorithms of limits of Twitter. I think the rules are more complicated than
described
. Does Twitter try to prohibit following? I'm sorry, I do not understand. Any ideas?
А по-русски -
здесь
.