Extension:TwitterFeed

From MediaWiki.org

Jump to: navigation, search

           

Manual on MediaWiki Extensions
List of MediaWiki Extensions
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.0
MediaWiki  1.6.x, 1.8.x, 1.9.x
License The MIT License
Download TwitterFeed.php
Example  See the Winkin Park

check usage (experimental)

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.

[edit] Installation

  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");
  1. Make sure that these php5 variables are activated:
allow_url_include = On
allow_url_fopen = On

[edit] Usage

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 :

  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

That's it!

[edit] Developer Notes

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.

[edit] Wikis Using this Extension