TIP JQTweetContrib is not installed on Foswiki.org.

JQTweetContrib

Put twitter on your website

TIP Important note about Twitter's API changes Twitter has discontinued its unauthenticated v1.0 API, so this widget has stopped working as of 2013-06-11. Twitter wants your only option for on-page widgets to be their own Embedded Timelines, but there are workarounds which involve installing server-side code to support this widget. Please see this discussion for more details.

arrow_right Alternatively use TwitterPlugin.

Summary

Put twitter on your website with tweet!, an unobtrusive javascript plugin for jquery.

Features

  • 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

Demo

Refresh

Usage

%JQREQUIRE{"tweet"}%

<div class="jqTweet {username:'foswiki'}"></div>

<div class="jqTweet {query:'#foswiki'}"></div>

Parameters

Name Description Default
username [string or array] required unless using the 'query' option; one or more twitter screen names (use 'list' option for multiple names, where possible) null
list [string] optional name of list belonging to username null
favorites [boolean] display the user's favorites instead of his tweets false
query [string] optional search query (see also: http://search.twitter.com/operators) null
avatar_size [integer] height and width of avatar if displayed (48px max) 48
count [integer] how many tweets to display? 10
fetch [integer] how many tweets to fetch via the API (set this higher than 'count' if using the 'filter' option) null
page [integer] which page of results to fetch (if count = fetch, you'll get unexpected results) 1
retweets [boolean] whether to fetch (official) retweets (not supported in all display modes) true
intro_text [string] do you want text BEFORE your your tweets? null
outro_text [string] do you want text AFTER your tweets? null
join_text [string] optional text in between date and tweet "auto"
auto_join_text_default [string] auto text for non verb: "i said" bullocks null
auto_join_text_ed [string] auto text for past tense: "i" surfed null
auto_join_text_ing [string] auto tense for present tense: "i was" surfing null
auto_join_text_reply [string] auto tense for replies: "i replied to" @someone "with" null
auto_join_text_url [string] auto tense for urls: "i was looking at" http:... null
loading_text [string] optional loading text, displayed while tweets load null
refresh_interval [integer] optional number of seconds after which to reload tweets null
twitter_url [string] custom twitter url, if any (apigee, etc.) "twitter.com"
twitter_api_url [string] custom twitter api url, if any (apigee, etc.) "api.twitter.com"
twitter_search_url [string] custom twitter search url, if any (apigee, etc.) "search.twitter.com"
template [string or function] template used to construct each tweet
  • - see code for available vars
  • "{avatar} {user_name} {text}
    {tweet_date}
    "
    comparator [function] comparator used to sort tweets (see Array.sort)
     function(tweet1, tweet2) {  return tweet2["tweet_time"] - tweet1["tweet_time"]; }
    filter [function] whether or not to include a particular tweet (be sure to also set 'fetch')
    function(tweet) {return true; }

    Installation Instructions

    You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

    Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

    If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

    Info

    Author(s): Todd Matthews & Steve Purcell (jquery.tweet); Michael Daum (foswiki package)
    Copyright: © Copyright (c) 2008-2011 Todd Matthews & Steve Purcell
    License: http://www.opensource.org/licenses/mit-license.php
    Release: 1.0
    Version: 14605 (2012-04-13)
    Change History:  
    13 Apr 2012: improved default template for tweets, required some changes to the orig jquery.tweet code
    Dependencies:
    NameVersionDescription
    Foswiki::Plugins::JQueryPlugin>=4.10Required
    Home page: Foswiki:Extensions/JQTweetContrib
    Support: Foswiki:Support/JQTweetContrib
    Topic revision: r5 - 20 Nov 2014, MichaelDaum - This page was cached on 25 Sep 2016 - 04:01.

    The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License