I make my own twitter. I exposed the corpus twitter request as a REST API using Java Servlets. However, when I perform a search using the REST API, all results (> 1000) are returned in a single HTTP response, and it takes some time to load.
I plan to add pagination for search, for example, the Twitter API. For instance,
http://search.twitter.com/search.json?q=blue%20angels&page=1&rpp=50
http://search.twitter.com/search.json?q=blue%20angels&page=2&rpp=50
Here rpp are the results on the page. Thus, in query 1, you can get the first 50 results by requesting a selection on the next page with 50 results.
Any suggestions on how this can be done in Java servlets? Now itβs very slow, as the HTTP response is getting huge ..
source
share