Twitter Api : Rate limit - know remaining Tweets I can do [closed]

余生颓废 提交于 2019-12-08 05:28:23

问题


I'm using Twitter API and there is something I don't undestand.

I can ask how many remaining calls I can do on a lot of things with the "rate_limit_status" call. (https://dev.twitter.com/rest/reference/get/application/rate_limit_status)

But it doesn't tell me how many tweets I can do or how many favorites I can do.

Is there a way to ask that ? I don't find the rate limits on theses actions. I made a test, and twitter stopped me after 300 tweets but I have no way to know when I will be able to tweet again with the API.

Why are these actions separate from the others ? Where can I find how the rate limit work on tweets and favorites ? Is there an other "API call" that I'm missing ?


回答1:


The rate limits on tweets has no rate limits that you can access from the Twitter REST API.

Solution for Update

Instead you should follow the following rule :

2,400 tweets per day. The daily update limit is further broken down into smaller limits for semi-hourly intervals. Retweets are counted as Tweets.

Source : https://support.twitter.com/articles/15364

Or 50 tweets every 30 minutes. In addition please note that Twitter can restrict the number of Tweets further based on rules that have not been made public.

Please be aware that Twitter will probably find this activity suspicious and block your account. You can let them know about what you intend to do by contacting their support.

Solution For Favourites Regarding the favorites you will have to base yourself on some headers returned in each query you make. The header often contains the information you are looking for (including, remaining, total authorized, and time before next refresh).

Beware of the documentation

Finally please note that the documentation you are referring to is not up to date and you should be able to get more RateLimits than specified in it.

You can find a post regarding this documentation that I made few weeks ago:

https://twittercommunity.com/t/ratelimits-properties-makes-no-sense/65498



来源:https://stackoverflow.com/questions/37112709/twitter-api-rate-limit-know-remaining-tweets-i-can-do

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!