Twitter Request 0.0

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



Details

Author
Luis Carlos Osorio Jayk
Current version
0.0
GitHub
Ciul/Twitter-Request
Downloads
2937
Category
Request
Tags
Report
GitHub Issues

Releases


Dependencies

  • _self_/_current_:
    • more/1.3 : JSONP
    • core/1.3 : *

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 http://dev.twitter.com/doc/get/statuses/user_timeline
there you will see other parameters you could use.

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

            new Element('div', {
                html: '<img src="' + tweet.user.profile_image_url.replace("\\",'') + '" align="left" alt="' + tweet.user.name + '" /> <strong>' + tweet.user.name + '</strong><br />' + tweet.text + '<br /><span>' + tweet.created_at + ' via ' + tweet.source.replace("\\",'') + '</span>',
                'class': 'tweet clear'
            }).inject(twitter);
        });
    }
}).send();

Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus