Extension:TwitterFeed

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
TwitterFeed

Release status: beta

Implementation Tag
Description Adds <twitterfeed> tag for display tweets.
Author(s) Baptiste 'BapNesS' Carlier
Last version 1.1
MediaWiki 1.6.x, 1.8.x, 1.9.x, 1.15.x
License The MIT License
Download TwitterFeed.php
Check usage and version matrix; stats

The TwitterFeed Extension is a MediaWiki extension which provides a means for display the last Twitter tweets into wiki articles.

Project Homepage
TwitterFeed Tutorial - Nesscorp.fr
Source Code
TwitterFeed SourceForge
Licensing
TwitterFeed is released under The MIT License.

Installation[edit]

  1. Download TwitterFeed, and be sure to rename the downloaded file to TwitterFeed.php.
  2. Drop this script in $IP/extensions
    Note: $IP is your MediaWiki install dir.
  3. Enable the extension by adding this line to your LocalSettings.php:
    require_once("$IP/extensions/TwitterFeed.php");
    
  4. Make sure that these php5 variables are activated:
allow_url_include = On
allow_url_fopen = On

Usage[edit]

Once installed, you may display tweets to any article.

To do so, simply add this text to the body of your page where you'd like the tweets to appear:

<twitterfeed id="sessions-userid"></twitterfeed>

or

<twitterfeed nb="nb-of-tweets" id="sessions-userid"></twitterfeed>

Where "id" is the session user id and "nb-of-tweets" the max number of appearing tweets. To get it :

Old Twitter:

  1. Go to the Twitter page:
    Example: http://twitter.com/winkinpark
  2. Copy the RSS Feed url:
    Example: http://twitter.com/statuses/user_timeline/76944488.rss
  3. And finally get the ID :
    Example: 76944488

New Twitter:

  1. Go to the Twitter page
    Example: http://twitter.com/winkinpark
  2. View Source (Ctrl+U in FF and Chrome) and search for (Ctrl+F) ".rss"
  3. This should match a URL like: http://twitter.com/favorites/123456789.rss
  4. 123456789 is your ID.


That's it!

Updates[edit]

v1.1 - 2010/09/18[edit]

  • Add links in the content.

Developer Notes[edit]

Once the extension is install, you can change the last lignes of the for-loop of the function renderTwitterFeed() in TwitterFeed.php. It must be usefull to customize the tweets display.

Wikis Using this Extension[edit]

See Also[edit]