Extension:Facebook

{{Extension|templatemode= SourceForge SVN ViewVC SVN Download
 * name       = Facebook Connect
 * status     = beta
 * type1      = user identity
 * type2      = parser
 * hook1      = AuthPluginSetup
 * hook2      = BeforePageDisplay
 * hook3      = MakeGlobalVariablesScript
 * hook4      = ParserAfterTidy
 * hook5      = ParserFirstCallInit
 * hook6      = PersonalUrls
 * hook7      = RenderPreferencesForm
 * hook8      = UserLoadFromSession
 * username   = gbruin
 * author     = Garrett Brown
 * description = Facebook Connect Mediawiki Integration
 * image      = FBConnect_logo.png
 * version    = r38 (14 Jan 2009)
 * update     =
 * mediawiki  = 1.14alpha
 * license    = GPLv2
 * download   =
 * readme     =
 * changelog  =
 * parameters =

Installation
To install this extension, add the following to LocalSettings.php:

Configuration parameters
This extension's configuration parameters are defined in FBConnectConfig.sample.php. In production, this file should be renamed to FBConnectConfig.php. The following configuration variables can be set in FBConnectConfig.php:

$fbApiKey
To use Facebook Connect you will first need to get a Facebook API Key:
 * 1) Visit the Facebook application creation page: http://www.facebook.com/developers/createapp.php
 * 2) Enter a descriptive name for your wiki in the Application Name field. This will be seen by users when they sign up for your site.
 * 3) Accept the Facebook Terms of Service.
 * 4) Upload icon and logo images. The icon appears in News Feed stories and the logo appears in the Connect dialog when the user connects with your application.
 * 5) Click Submit.
 * 6) Copy the displayed API key and application secret into the config file.
 * Default value:  - Change this!

$fbApiSecret

 * Default value:  - Change this!

$fbCallbackURL
This is the application's callback URL (the location where index.php resides). Make sure it's your exact root - facebook.com and www.facebook.com are different.

Set the callback URL in your developer app to match the one you specify in the config file. This is important so that the Javascript cross-domain library works correctly.

Note that each callback URL needs its own app id.
 * Default value:  - Change this!

$fbBaseURL
This is the root of the facebook site you'll be hitting. In production this will be facebook.com. However, Facebook Connect has now been released and changing this value seems to invalidate the code. Maybe in the future?
 * Default value:

$fbFeedBundleId
The feed story template needs to be registered with your app_key, and then just passed at run time. To register the feed bundle for your app, visit http://www.yourwiki.com/path_to_extensions/FBConnect/register_feed_forms.php
 * Default value:  - Change this if you're brave enough to register a form feed, I definitely am not.

$fbLogo
Location of the 16x16 Facebook logo. You can copy this to your server if you want. It replaces the user icon that appears near the Facebook ID usernames.
 * Default value:  - Can also be set to

$fbAllowOldAccounts
Allows non-Connected user accounts to login. Set this to true to allow users to continue logging into your site with old-style user names.
 * Default value:  (  is currently untested)

$fbConnectOnly
Disables new account creation. If this is set, then accounts can only be created by a successful Connection.
 * Default value:  (  is currently untested)

$fbUseMarkup
Allows the use of XFBML in wiki text. See XFBML note
 * Default value:

$wgRemoveUserTalkLink
Set this to true to remove the link to a user's talk page in the personal toolbar (the menu in the upper right). This parameter will probably be named  in the future.
 * Default value:

$wgShowIPinHeader
This value will automatically be set to  in config.sample.php. It removes the link to the user's IP address when they are not logged in, so that only the Facebook Connect logo will be displayed. See Manual:$wgShowIPinHeader.
 * Default value:

Usage

 * To merge existing users into Facebook IDs, see Extension:Renameuser and Extension:User Merge and Delete.
 * For information on Facebook Markup tags, see the Facebook Dev Wiki.
 * If you need custom FBML-handling rules, the entire code for these tags is a switch statement in FBConnectXFBML::parserHook. To disable a tag, simply return an empty string.

User rights
Coming eventually...

SVN Access
This extension is currently hosted at SourceForge. Download the individual files through ViewVC or through SVN:

Alternatively, you can download the individual files from here, though they may be somewhat out-of-date.

List of files

 * 1) FBConnect/FBConnect.php
 * 2) FBConnect/config.sample.php
 * 3) FBConnect/FBConnect.alias.php
 * 4) FBConnect/FBConnect.i18n.php
 * 5) FBConnect/fbconnect.js
 * 6) FBConnect/fbconnect.css
 * 7) FBConnect/FBConnectAuthPlugin.php
 * 8) FBConnect/FBConnectHooks.php
 * 9) FBConnect/FBConnectXFBML.php
 * 10) FBConnect/xd_receiver.php

wz-tooltip library

 * FBConnect/wz_tooltip/wz_tooltip.js
 * FBConnect/wz_tooltip/wz_tooltip.js

Facebook PHP client library
Download from http://svn.facebook.com/svnroot/platform/clients/packages/facebook-platform.tar.gz and copy the facebook-client folder to extensions/FBConnect/facebook-client, or copy/paste the code from the following files into the correct directories.


 * FBConnect/facebook-client/facebook.php
 * FBConnect/facebook-client/facebook_desktop.php
 * FBConnect/facebook-client/facebookapi_php5_restlib.php
 * FBConnect/facebook-client/jsonwrapper/jsonwrapper.php
 * FBConnect/facebook-client/jsonwrapper/jsonwrapper_inner.php
 * FBConnect/facebook-client/jsonwrapper/JSON/JSON.php
 * FBConnect/facebook-client/jsonwrapper/JSON/LICENSE
 * FBConnect/facebook-client/jsonwrapper/JSON/JSON.php
 * FBConnect/facebook-client/jsonwrapper/JSON/LICENSE
 * FBConnect/facebook-client/jsonwrapper/JSON/LICENSE

Files I have deleted / renamed

 * 1) FBConnect/FBConnect_body.php
 * 2) FBConnect/FBConnectAutoAuthenticate.php
 * 3) FBConnect/FBConnectClient.php
 * 4) FBConnect/FBConnectConfig.sample.php
 * 5) FBConnect/FBConnectCore.php
 * 6) FBConnect/FBConnectInit.php
 * 7) FBConnect/FBConnectPersonalUrls.php
 * 8) FBConnect/FBConnectSetup.php
 * 9) FBConnect/SpecialConnect.php
 * 10) FBConnect/register_feed_forms.php