Search code examples
apitwittertweets

How to retrieve all tweets from a user and not just the first 3,200 as Twitter limits it’s timeline and API to


With https://dev.twitter.com/docs/api/1/get/statuses/user_timeline I can get 3,200 most recent tweets. However, certain sites like http://www.mytweet16.com/ seems to bypass the limit, and my browse through the API documentation could not find anything.

How do they do it, or is there another API that doesn't have the limit?


Solution

  • You can use twitter search page to bypass 3,200 limit. However you have to scroll down many times in the search results page. For example, I searched tweets from @beyinsiz_adam. This is the link of search results:

    https://twitter.com/search?q=from%3Abeyinsiz_adam&src=typd&f=realtime
    

    Now in order to scroll down many times, you can use the following javascript code.

    var myVar=setInterval(function(){myTimer()},1000);
    function myTimer() {
        window.scrollTo(0,document.body.scrollHeight);
    }
    

    Just run it in the FireBug console. And wait some time to load all tweets.