Extension:WikiTwidget

The WikiTwidget extension provides a simple way to insert a Twitter widget showing your timeline into a wiki page.

Configuration parameters
To use WikiTwidget, you need to create a Twitter widget first. Twitter will generate some code that looks like this:

(line breaks added to increase legibility)

To insert this widget into the page, copy the  tag but do not include the text "Tweets by..." or the close tag. You should have some code like this:

Remove the  at the start of the tag and replace it with , and add a slash before the final.

Insert this tag into the page, and voilà! You can enjoy your embedded Twitter feed on your wiki.

Further customization options can be specified when creating the widget; see the developer documentation on Twitter timelines for more information. Valid widget attributes added to the  tag will be transferred to the finished widget. Valid tags are:


 * data-theme (the theme of the widget): light or dark
 * data-link-color (link colour): specify as a hex code, e.g. #00ff99
 * data-border-color (border colour): hex code
 * data-chrome (widget appearance): add as many of the following as desired, separated by a space:
 * noheader - removes the header
 * nofooter - removes footer and Tweet box
 * noborders - hides all borders in and around the widget
 * noscrollbar - hides main timeline scrollbar
 * transparent - no background colour
 * width (widget width in pixels)
 * height (widget height in pixels)
 * lang (language)
 * data-tweet-limit (the number of tweets displayed in a timeline; widget will not update with this option on): between 1 and 20
 * data-related (suggest other tweeps to follow)
 * data-aria-polite (settings for users with assistive technology): polite or assertive

Troubleshooting
WikiTwidget is an extremely simple extension; all it does is convert a  tag into an   tag, and add some javascript to the page. WikiTwidget does some *very* minimal checking of parameters, and will throw up an error if something looks obviously wrong, e.g. if the  value is not numerical. Invalid attributes (listed in the section above) are ignored.

The Twitter widget itself created using javascript, so the symptoms of something being amiss will generally be that in place of a widget, you'll see a link saying "Tweets from username" (or "Tweets about ...", "Favourite tweets by ..."). Check that the  value is correct, that javascript is enabled in your browser, and that you don't have a browser plugin like Ghostery blocking content from another domain.

Please email comments, questions, or bug reports to amelia.ireland at gmod.org.

Wiki Compatibility
WikiTwidget uses ResourceLoader, which was introduced in MW 1.17. I only have access to wikis running 1.19.2 and 1.21.1, so I cannot guarantee that WikiTwidget will work on earlier versions of MediaWiki. A quick solution for earlier MediaWikis is to add the javascript to MediaWiki:Common.js on your wiki: