Extension:FacebookImport

=MORE DETAILS TO FOLLOW=

Description
A MediaWiki extension to facilitate the transfer of information and resources from Facebook into a wiki. It does this in two ways.
 * 1) When users log in using Facebook (via the Facebook Open Graph Extension) they are presented with a form populated with information from their Facebook profile, submission of which populates their User Page with that information.
 * 2) A Special Page is created to which can be submitted the URL of a photograph on Facebook. Upon submission, the photo is imported into the wiki.

Dependencies and Requirements

 * 1) Developed using MediaWiki 1.19, untested on other versions.
 * 2) Requires the Facebook Open Graph Extension.
 * 3) The MediaWiki API needs to be enabled.
 * 4)  and   need to be enabled, and users need to have the upload and upload_by_url permissions, in order to import photos.
 * 5)  and   need to be enabled
 * 6) you will need to provide the values for variables   and   from a target Facebook app.

Installation

 * Insert the following into your  file (but above the PHP end-of-code delimiter,

Configuration
Firstly, ensure the Facebook Open Graph Extension is configured correctly to work with your chosen Facebook application. In order to enable photo imports, you will need to add the following hook to your LocalSettings.php file, as also detailed on the Facebook Open Graph Extension wiki page.

This should allow users to import their own photos (or photos they're tagged in). You will need to add the 'user_photos' permission to the scope array for this. The 'friends_photos' permission is needed to allow users to import friends' photos. These permissions also need to be enabled in your Facebook application.

Configuration options for this extension take the form of two arrays in FacebookImport.php, $wgFbImportOptions and $wgFbConnectionImportOptions. The elements of those arrays are themselves arrays, each with three elements - a boolean value to indicate whether that item should be included in the User Page import form, a string for the label for that input, and a string for the type of input (text or textarea).