Extension:TwitterCards

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
TwitterCards

Release status:Extension status experimental

ImplementationTemplate:Extension#type Parser extension, User interface
DescriptionTemplate:Extension#description Adds meta tags to enable Twitter cards on MediaWiki.
Author(s)Template:Extension#username Harsh Kothari and Kunal Mehta
MediaWikiTemplate:Extension#mediawiki 1.21+
PHPTemplate:Extension#php 5.3+
Database changesTemplate:Extension#needs-updatephp No
LicenseTemplate:Extension#license GPLv2+
Download
Hooks usedTemplate:Extension#hook
BeforePageDisplayManual:Hooks/BeforePageDisplay

Translate the TwitterCards extension if it is available at translatewiki.net

Check usage and version matrix.

IssuesPhabricator

Open tasks · Report a bug

The TwitterCards extension adds meta tags to enable Twitter cards on MediaWiki. It requires that the TextExtracts extension is installed.

About Twitter cards[edit]

Twitter describes this feature like this:

“Twitter cards make it possible for you to attach media experiences to Tweets that link to your content. Simply add a few lines of HTML to your webpages, and users who Tweet links to your content will have a "card" added to the Tweet that’s visible to all of their followers. It would be really nice for articles, images, videos - everything linked from Wikimedia on Twitter could have a nice little preview on Twitter. The documentation is at Twitter cards - basically it involves adding some meta tags around existing content server-side.”

Installation[edit]

  • Download and place the file(s) in a directory called TwitterCards in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/TwitterCards/TwitterCards.php";
    
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Resources[edit]