Extension:Community Twitter

The Community Twitter Extension gives a defined group of users the opportunity to twitter using one or more community twitter accounts. Users have the ability to tweet, retweet and delete tweets.

If you manage a smaller wiki, you have the ability to register an app for each user, so users identify themselves via the app name (see e.g. http://twitter.com/Hickernews/status/24840953797). Applications must link to the corresponding user page in the wiki, so each user can only delete his own tweets.

German speaking users can find installation instructions here.

Todo

 * Record all tweets in a DB table to be able to remember the author of the tweet (currently for small Wikis only)
 * Introduce some other kind of signature, maybe something like "^xy" as the last three characters in a tweet

Installation Instructions
1. Register a Twitter account (or more) if you haven't already done.

2. Register an application/applications on https://dev.twitter.com with read & write access. Choose what fits your needs:


 * If you maintain a big wiki with lots of users using Community Twitter:
 * Register one app. The name of the application gets displayed under the tweet. You might want to call it like the wiki.


 * If you maintain a manageable wiki with just a few users using Community Twitter:
 * Register an application for each user who should be able to tweet. The name of the application gets displayed under the tweet. Call it like the corresponding user and link to the user page (to let the extension link the user to his tweets). This is a cool way to have kind of a signature in order to guard against abuse. Users can only delete their own tweets.

3. Append the following CSS code to your /wiki/MediaWiki:Common.css:

4. Create a new table in your SQL-DB by executing the following SQL-Code:

Note: If you change the table name, you have to adapt the LocalSettings.php (in step 9).

5. Insert application data in the SQL table (e.g. via phpMyAdmin), depending on what you chose in the second step:


 * as user_id fill in the id of the user, who will be twittering via this app (look up in "user" table). If you chose to register just one app, set this to 0.
 * (Note: joint and individual accounts must not be merged!)
 * as app_name a self-defined name identifying the twitter account (has to be consistent; if you run only one Twitter account, it's everywhere the same)
 * consumer_key is the Consumer Key on dev.twitter.com for your app
 * consumer_secret is the Consumer Secret on dev.twitter.com for your app
 * access_token is the Access Token on dev.twitter.com for your app
 * access_token_secret is the Access Token Secret on dev.twitter.com for your app
 * set active whether the user should be able to tweet or not (0=false, 1=true)

Note: In case you registered two Twitter accounts, just connect the registered application to both accounts (see e.g. http://jeffmiller.github.com/2010/05/31/twitter-from-the-command-line-in-python-using-oauth).
 * consumer_key and consumer_secret should be the same for each Twitter account in this case, only access_token and access_token_secret vary!

6. Create advice and description wiki pages. Their titles are defined in Twitter.i18n.php ("twitter_advice_template" and "twitter_description_template").
 * These pages get displayed above (description) and under (advice) the Tweet! section.

7. Get twitteroauth and extract it, so that it's available at
 * /w/includes/twitteroauth/twitteroauth.php (OAuth.php should be in the same folder)

8. Move the extracted "Twitter" folder to /w/extensions/

9. Append the following configs to your LocalSettings.php and customize them:

10. That's it.