jTweetsAnywhere

Demo

Supplying your own Decorator

 
<div id="jTweetsAnywhereSample">
</div>

<script type="text/javascript">
$('#jTweetsAnywhereSample').jTweetsAnywhere({
    searchParams: ['q=twitterapi', 'lang=en'],
    count: 10,
    tweetTimestampDecorator: function(tweet, options){
       var screenName =
           tweet.user ? tweet.user.screen_name : false || tweet.from_user;
       var date = new Date(formatDate(tweet.created_at));

       var dateString =
           date.getHours() + ':' +
           (date.getMinutes() < 10 ? '0' : '') +
           date.getMinutes() + ' ' +
           (date.getMonth() + 1) + '/' +
           date.getDate() + '/' +
           date.getFullYear();

        var html =
            '<span class="jta-tweet-timestamp"> "' +
            '<a class="jta-tweet-timestamp-link" href="http://twitter.com/' +
            screenName + '/status/' + tweet.id + '">' +
            dateString + '</a></span>';

       return html;
    }
});
</script>

Here's the code to create this tweet feed. The default timestamp decorator is overwritten by our own implementation.

IMPORTANT: The sample code in the decorator here does NOT handle native reweets that might occur in a user's feed. Since we display the results of a Twitter search, it's not necessary, but if you plan to show up a user's feed, please have a look at the implementation of the defaultTweetTimestampDecorator.

HINT: If you just plan to change the format of the tweet timestamps, it's much easier since V1.2.0 to overwrite the tweetTimestampFormatter.

Current Release: V1.3.1