Getting latest Tweets: API

Home Forums Programming Getting latest Tweets: API

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #3150
    Satish
    Keymaster

    Paste this javascript into your header:

    
    <script 
    src="http://twitter.com/statuses/user_timeline/technotip.json?callback=updateTweets" >
    </script>
    

    use forloop or while loop to replace twitter username in above url.
    updateTweets is a method, that we write to fetch the latest tweets.

    
    function updateTweets(tweets)
    {
     var tweetsSelection = document.getElementById("tweets");
    
     for(var i=0; i< tweets.length; i++)
        tweet = tweets[i];
    
     var option  = document.createElement("div");
     option.innerHTML(tweet.text);
    }
    
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.