See tweet.seaofclouds.com (original version), or the bundled index.html
file.
See issue #288 for customizion intention.
Customized at 08/31/2012 by Daniel Kulbe for Drupal module integration called "Tweet!"
- small size and fast download time
- will not slow down or pause your page while tweets are loading
- display up to 100 tweets, as permitted by the twitter search api
- display tweets from a twitter search, or from your own feed
- optional verb tense matching, for human readable tweets
- optionally display your avatar
- optionally display tweets from multiple accounts!
- automatic linking of @replies to users’ twitter page
- automatic linking of URLs
- automatic linking of #hashtags, to a twitter search of all your tags
- converts <3 to a css styleable ♥ (we ♥ hearts)
- customize the style with your own stylesheet or with other jquery plugins
- customize the layout with a user-defined template function
- supports RequireJS and other AMD-compatible javascript loaders
-
- optionally display format an absolute time
-
Get JQuery. In these examples, we use Google's AJAX Libraries API.
-
include jQuery and jquery.tweet.js files in your template's
<head>
.<script language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script> <script language="javascript" src="/tweet/jquery.tweet.js" type="text/javascript"></script>
-
Also in
<head>
, Initialize tweet! on page load with your Username and other options<script type='text/javascript'> jQuery(function($){ $(".tweet").tweet({ join_text: "auto", avatar_size: 32, count: 3, loading_text: "loading tweets..." }); }); </script>
-
In
<body>
, include a placeholder for your tweets. They'll get loaded in via JSON. How fancy!<div class="tweet"></div>
-
Style with our stylesheet in
<head>
, or modify as you like!<link href="jquery.tweet.css" media="all" rel="stylesheet" type="text/css"/>
username: null
- [string or array] required unless using the 'query' option; one or more twitter screen names (use 'list' option for multiple names, where possible)relative_time: true
- [boolean] wether to show a relative timeformat_time: "{tweet_mon}/{tweet_day}/{tweet_year} - {tweet_hour}:{tweet_minutes}"
- [string] time format when display an absolute time, we use the international time format symbolslist: null
- [string] optional name of list belonging to usernamefavorites: false
- [boolean] display the user's favorites instead of his tweetsquery: null
- [string] optional search query (see also: http://search.twitter.com/operators)avatar_size: null
- [integer] height and width of avatar if displayed (48px max)count: 3
- [integer] how many tweets to display?fetch: null
- [integer] how many tweets to fetch via the API (set this higher than 'count' if using the 'filter' option)page: 1
- [integer] which page of results to fetch (if count != fetch, you'll get unexpected results)retweets: true
- [boolean] whether to fetch (official) retweets (not supported in all display modes)intro_text: null
- [string] do you want text BEFORE your your tweets?outro_text: null
- [string] do you want text AFTER your tweets?join_text: null
- [string] optional text in between date and tweet, try setting to "auto"auto_join_text_default: " I said, "
- [string] auto text for non verb: "I said" bullocksauto_join_text_ed: " I " - [string] auto text for past tense: "I" surfed
auto_join_text_ing: " I am "
- [string] auto tense for present tense: "I was" surfingauto_join_text_reply: " I replied to "
- [string] auto tense for replies: "I replied to" @someone "with"auto_join_text_url: " I was looking at "
- [string] auto tense for urls: "I was looking at" http:...loading_text: null
- [string] optional loading text, displayed while tweets loadrefresh_interval: null
- [integer] optional number of seconds after which to reload tweetstwitter_url: "twitter.com"
- [string] custom twitter url, if any (apigee, etc.)twitter_api_url: "api.twitter.com"
- [string] custom twitter api url, if any (apigee, etc.)twitter_search_url: "search.twitter.com"
- [string] custom twitter search url, if any (apigee, etc.)template: "{avatar}{time}{join}{text}"
- [string or function] template used to construct each tweetli
- see code for available varsfilter: function(tweet) {...}
- [function] whether or not to include a particular tweet (be sure to also set 'fetch')
Bring your code slinging skills to Github and help us develop new features for tweet!
git clone git://github.com/seaofclouds/tweet.git
Report bugs at http://github.com/seaofclouds/tweet/issues