Using Twitter REST API in JSON Format with AJAX
<p>I'm trying to do AJAX on Twitter REST API (JSON Format). I did the below thing, But, nothing happens. </p>

<p>Not getting any response from server (Twitter). Did I miss something?</p>

<pre><code>function getRecentTweet(){

        twitterUsername = document.getElementById("twitterUsername").value;

        if(window.XMLHttpRequest){
            xhr = new XMLHttpRequest();
        }
        else{
            xhr = new ActiveXObject("Microsoft.XMLHTTP");
        }

        xhr.open("GET", "http://api.twitter.com/1/statuses/user_timeline/" + twitterUsername + ".json", true);
        xhr.send(null);

        xhr.onreadystatechange = function(){
            if (xhr.readyState == 4) {
                if(xhr.status == 200) {
                    var jsonObj = eval(responseJSON);
                    document.getElementById("twitterStream").innerHTML = jsonObj[0].text;
                }
            }
        } 
    }
</code></pre>

<p>Thanks!</p>
