Twitter, has a rich API and it allows you to deal with many things. In this example we are going to learn how to use jQuery to get the latest tweet of a user.

Twitter API

Get the last tweet of a user, simply by changing  “username” in the following url:

For example, in order to get my latest tweet from my twitter:


1. jQuery Ajax

We use Jquery .ajax() function to get the last tweet of the user and display it.



var username = $(‘#username’).val();


type: “GET”,

dataType: “json”,

url: “”+username+”&rpp=1&callback=?”,

success: function(data){





2.Download the Full HTML Example

Download example