Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Make a request to Twitter API for statuses/user_timeline, so you can get tweets and other stuff.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.

Twitter Request

Request Twitter statuses/user_timeline and receive the json response. You can get tweets, user picture and other stuff from it.

How to use

Basically you make a RequestTwitter instance with Twitter Api parameters in options,
then, at success event, you catch the json response.

Read more about how to get Twitter statuses/user_timeline at
there you will see other parameters you could use.

var twitterRequest = new RequestTwitter({
    parameters: {
        screen_name: 'mootools',
        count: 5
    success: function(data) {          
        data.each(function(tweet, i) {

            new Element('div', {
                html: '<img src="' + tweet.user.profile_image_url.replace("\\",'') + '" align="left" alt="' + + '" /> <strong>' + + '</strong><br />' + tweet.text + '<br /><span>' + tweet.created_at + ' via ' + tweet.source.replace("\\",'') + '</span>',
                'class': 'tweet clear'
Something went wrong with that request. Please try again.