why Twitter cannot handle multiple request in 1 hour?

I am developing a web-based (Business)application in Java (GWT 2.0.1) where number of users comes & make request to twiter. Approx 1000 of usres (more than that) make request to Twitter through my web-based application.for that I used twitter4j-2.0.9.jar

Is there any way… so I can avoid “Rate limit exceeded” problem. means number of (1000 >) request per hour.

I got following exception when I make 30+ request in 1 hour through my web-site

twitter4j.TwitterException: 400:The request was invalid. An accompanying error message will explain why. This is the status code will be returned during rate limiting.

< ?xml version="1.0" encoding="UTF-8"?>

< hash>

  < request>/statuses/followers.xml< /request>

  < error> Rate limit exceeded. Clients may not make more than 30 requests per hour.< /error>

< /hash>

at twitter4j.http.HttpClient.httpRequest(HttpClient.java:469)
at twitter4j.http.HttpClient.get(HttpClient.java:412)
at twitter4j.Twitter.get(Twitter.java:276)
at twitter4j.Twitter.get(Twitter.java:228)
at twitter4j.Twitter.getFollowersStatuses(Twitter.java:1363)
at twitter4j.Twitter.getFollowers(Twitter.java:1350)
at com.wissen.supergroupers.server.impl.TwitterServiceImpl.getTwitterFollowers(TwitterServiceImpl.java:40)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:562)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:188)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:224)
at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)

Is there any way… so I can avoid “Rate limit exceeded” problem. means number of (1000 >) request per hour.

Please provide Good solution !!!

Hope for Best co-operation from your side

Thanks in advance

Answer

Try getting Whitelisted. From the rate-limiting documentation:

Whitelisting

Some applications find that the default limit proves insufficient. Under such circumstances, we offer whitelisting. It is possible to whitelist both user accounts and IP addresses. Each whitelisted entity, whether an account or IP address, is allowed 20,000 requests per hour. If you are developing an application and would like to be considered for whitelisting you fill out the whitelisting request form. We review each whitelisting application and it can sometimes take a week to receive a decision. Once we have made our decision we will email the address associated with the Twitter account that filed the application.

Leave a Reply

Your email address will not be published. Required fields are marked *