DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:facebookwall

facebookwall Plugin

Compatible with DokuWiki

  • 2017-02-19 "Frusterick Manners" unknown
  • 2016-06-26 "Elenor Of Tsort" yes
  • 2015-08-10 "Detritus" yes
  • 2014-09-29 "Hrun" yes

plugin This plugin allows you to get the Contents of your Facebook wall and display it in DokuWiki.

Last updated on
2012-09-29
Provides
Syntax
Repository
Source

This pluging allows you to connect to your Facebook page and display the status messages on your Facebook wall in DokuWiki. This plugin uses Facebook Graph API v2.7.

Installation

:!: External requirements: This plugin requires the following additional components that must be installed separately:

  • This plugin uses the Facebook Graph API v2.7, which requires
    • The CURL PHP extension to be installed
    • The JSON PHP extension to be installed
  • Additionally, you must create a Facebook App, which allows you to connect to Facebook using
    • App ID, which identifies your Facebook App (you can have multiple Apps)
    • App Secret, which secures your Facebook App

Install the plugin using the Plugin Manager and the download URL above, which points to latest version of the plugin. Refer to Plugins on how to install plugins manually.

Examples/Usage

  • {{facebookwall>appid=123456&secret=123456&fanpageid=123456}} 1)
  • {{facebookwall>appid=123456&secret=123456&fanpageid=123456&numberOfEntries=3&sort=DESC}} 2)

See the plugin in action here. The sample page shows all the styles available with the plugin.

Syntax

{{facebookwall>key=value&..&key=value}}
key the parameter key to set optional
value the parameter value to set optional

Multiple key=value parameters can be set using the & as a seperator.

Available parameters:

Key Type Comments Requirement Version
appid string This is the mandatory App ID of your Facebook App mandatory all
secret string This is the mandatory App Secret of your Facebook App mandatory all
fanpageid string This is the ID of your Facebook page. You can find this ID by going to your Facebook page. Typically, the link of your page looks like https://www.facebook.com/#!/pages/<page name>/<page ID>. Copy the page ID from the URL and use it in the syntax. mandatory all
showAs string Default: default. Allows you to use alternate display of the wall posts using configuration parameters. You can add more templates by editing the default.php and metadata.php files in the conf/ directory. optional all
from date This indicates the date from which the wall posts should be displayed. Older wall posts are disregarded. Format is DD/MM/YYYY. The value 'today' is also valid. optional all
to date This indicates the date to which the wall posts should be displayed. Newer wall posts are disregarded. Format is DD/MM/YYYY. The value 'today' is also valid. optional all
numberOfEntries number Indicates the maximum number of entries to display. optional all
sort string Default: DESC. Allows you to sort by the date of the wall post. Valid values are 'ASC' and 'DESC'. optional all
limit number Default: 0. Allows you to limit the maximum number of characters displayed for the message. optional Version 1.1

Configuration and Settings

Key Type Comments Requirement Version
dformat date Formatting of the event date (See Format) required all
tformat date Formatting of the event time (See Format) required all
default string Default template for displaying wall posts. required all
table string Template for displaying wall posts as a table. required all

Display templates

You may not add your own configuration parameters in order to display the wall posts in different formats. The appropriate configuration parameter for the template can be set via the syntax parameter showAs.

In order to make a new template, for example on that displays all wall posts as an unsorted list, the configuration files must be changed as follows:

conf/metadata.php

If you wish to alter your self-created template in the administration panel, you must setup the metadata for this parameter.

Example:

$meta['unsortedlist'] = array('');

conf/default.php

If you wish to set a default setting for the newly created parameter, you can set it up in default.php. This is optional, you can also use the administration panel to setup the configuration parameter.

$conf['unsortedlist'] = '  * {date}: {message} ';

showAs

Once the configuration parameter has been added, you can use it in the plugin syntax:

{{facebookwall>appid=123456&secret=123456&fanpageid=123456&showAs=unsortedlist}}

Template tags

The templates, which can be configured in conf/default.php, or via the administraton panel, is parsed using the following tags:

Tag Comments Version
{date} The date of the wall post. The date format can be configured in the conf/default.php file. all
{time} The time of the wall post. The time format can be configured in the conf/default.php file. all
{datetime} The date and time of the wall post. This functions as {date} {time}. all
{message} This contains the content of the Facebook wall post. all
{url} The unformated URL of the wall post. You can use this in your template to make your own links to the post. all
{more} This is a fomated link to the wall post, using the language files to output a Read more... link. all
{attachment} Displays link, photo and video attachments. Version 1.2

Development

Change Log

  • 2016-09-29 Version 1.3 released
    • Updated to use Facebook Graph API 2.7 instead of the Facebook PHP SDK.
  • 2012-03-27 Version 1.2 released
    • Added {attachment} tag, which displays link, photo or video attachments.
  • 2012-03-26 Version 1.1 released
    • Minor bugfixes
    • Added 'limit' parameter that allows you to set the maximum number of characters displayed for {message}.
  • 2012-02-14 Version 1.0 released
    • Initial release

Known Bugs and Issues

ToDo/Wish List

FAQ

Thank you for your contributions!

1)
Displays all status messages on the facebook wall
2)
Displays the 3 newest status messages on the facebook wall
plugin/facebookwall.txt · Last modified: 2016-09-29 18:46 by jdt