Facebook Comments

From MediaWiki Widgets

Facebook Comments widget
Description:Allows you to add Facebook Comments.
Author:Sergey Chernyshev
Code:Widget:Facebook Comments
Updated:December 4, 2016
If you use code on your wiki which is older than this date you may want to update since your widget may be insecure or broken.
Inv-Icon tools.svg.png

To copy this widget to your wiki, cut and paste the entire source of the Facebook Comments widget code page into a page called Widget:Facebook Comments on your wiki.

If you don't have the Widget extension set up on your wiki, go to its description page on and follow the installation instructions.

This widget allows you to add Facebook Comments widget to your wiki page.

To insert this widget, use the following code:

{{#widget:Facebook Comments


  • appID - Facebook application ID, you need to register your app first
  • url - canonical URL of the page to show comments for. Needed to display comments properly on preview pages and etc. Use {{fullurl:{{PAGENAME}}}} code to insert URL of current page
  • num - number of comments displayed (defaults to 5)
  • width - width of the widget in pixels (defaults to 470)
  • dark - if set, will use dark theme instead of light

Administering comments

You have to set fb:app_id open graph property too indicate to Facebook that you're the administrator of the site and can moderate comments and add section.

Just include the following code in your LocalSettings.php:

$wgExtensionFunctions[] = 'mww_fb_app_id';
function mww_fb_app_id() {
        global $wgOut;
        $wgOut->addHeadItem("fb:app_id", '<meta property="fb:app_id" content="{YOUR-APP-ID}"/>');

Sample result

See also


blog comments powered by Disqus