I have a website that uses Twitter API. The thing is that site becomes blank once the API limit is reached (I think) and then after a while it starts displaying the results.
I am running on GAE appspot. Because I have the appspot subdomain, does this mean that I can never be blacklisted?
Also what is the use of a Twitter API,开发者_JAVA技巧 when I can directly search Twitter publicly?
No, your application can be blacklisted.
The REST API does account- and IP-based rate limiting.
You cant even be in their whitelist in this situation (being in Google App Engine), acoording to their documentation:
(...) This works in most situations but for cloud platforms like Google App Engine, applications without a static IP addresses cannot receive Search whitelisting. (...)
(emphasis is mine)
Read Twitter Rate Limit for complete information about other limits and information.
If your application is being blocked due to exceeding the limit, then you should get a 400 HTTP response code. If you've written your application such that it generates a blank page when it gets an HTTP failure, then you have your answer. (How you check for HTTP errors in your particular development framework is a separate matter.)
You should use the API instead of scraping the public Twitter pages because IP addresses are subject to API rate limiting just like authenticated API accounts. When you authenticate with your account, you're not subject to the IP limit, so other people abusing Twitter from the same IP address (as might happen from a shared server environment like Google's) won't limit your use. This is all explained in the Rate limiting documentation from Twitter.
精彩评论