Please create an account or log in to build a reputation and unlock more editing privileges!!!

Facebook Comments

From MediaWiki Widgets
Jump to: navigation, search
Facebook Comments widget
Author:Sergey Chernyshev
Widget Provider:Facebook
Widget Code:Widget:Facebook Comments
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 MediaWiki.org and follow the installation instructions.

Contents


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={YOUR-APP-ID}
|url={{fullurl:{{PAGENAME}}}}
|num=5
}}

Parameters

  • 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

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox