Fandom

Wikia Developers Wiki

TwitterWidget

888pages on
this wiki
Add New Page
Talk0 Share

TwitterWidget is a simple script that allows wikis to securely and easily embed feeds into pages on the wiki. This also allows users to embed their own feeds on their user pages if they so choose.

TwitterWidget uses a simple template based way of creating feeds to make the process of embeding them extremely easy.

Usage

  1. To use TwitterWidget you must first install the script in your wiki's MediaWiki:Wikia.js or your wiki's MediaWiki:Common.js.
    • If you are using importArticles() you simply need to add the following line to the statement:
      'u:dev:TwitterWidget/code.js'
    • If you are not yet using importArticles() you can import the script by adding the following line instead:
      importScriptPage('TwitterWidget/code.js', 'dev');
  2. After installing the JavaScript component you must then add the template portion. To do this simply create Template:Twitter on your wiki and add the following code to it:
    <div class="twitter-embed-widget"><span style="display:none;" class="twitter-name">{{{name|}}}</span><span style="display:none;" class="twitter-code">{{{id|}}}</span><div class="twitter-widget-container">Loading...</div></div>

After you complete the above two steps you simply need to add the following code to your page and your shiny new feed will be automatically embeded.

{{Twitter
| name = velvaline
| id   = mytwitterwidgetid
}}

For more information on how to get your Twitter id and name please see this page.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.