It's better when it's simple

User Tools

Site Tools


SocialCards Plugin

Compatible with DokuWiki

  • 2024-02-06 "Kaos" unknown
  • 2023-04-04 "Jack Jackrum" yes
  • 2022-07-31 "Igor" yes
  • 2020-07-29 "Hogfather" yes

plugin Adds social media cards and semantic data to your wiki pages

Last updated on

Adds social media cards (Twitter cards) and OpenGraph metadata (used amongst others by Facebook and Google+) to your wiki pages.


Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.

After installation and configuration you need to validate your card with Twitter. Go to and paste in a URL from your Wiki. Once you have previewed the card, Twitter will white list your website and start serving Twitter Cards in tweets.

Previously Twitter required approval to use cards, however this is now only necessary for 'Player' Cards – those with videos/audio.

Configuration and Settings

In the config panel the Twitter name used for the site and optionally that of an author should be entered, also you will want to update the language and fall back image. Optionally you can enter a Facebook App ID.

Since OpenGraph is based on RDF you need/may want to add the namespaces to your template to keep your pages syntactically valid and semantically correct. This should be done for the pages: main.php, mediamanager.php and detail.php pages of your template.

For (x)html 4 templates add the following namespaces to the html tag:


Which would then look something like:

<html xmlns="" xml:lang="nl" lang="nl" xmlns:og="" xmlns:fb="" xmlns:article="" xmlns:place="">

For (x)html 5 templates add the following namespace prefixes to the head tag:

prefix="og: fb: 
article: place:"

Which would then look something like:

<head prefix="og: fb: article: place:">


Change Log

plugin/socialcards.txt · Last modified: 2023-10-31 00:09 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki