Request Twitter statuses/user_timeline and receive the json response. You can get tweets, user picture and other stuff from it.
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();
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