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      =
 * version    = r30 (20 Dec 2008)
 * update     =
 * mediawiki  = 1.14alpha (only!)
 * license    = GPLv2
 * download   =
 * readme     =
 * changelog  =
 * parameters =  . Further investigation into this matter is needed.''


 * Note: This is not a security hole in XFBML. XFBML markup is in on the page of the MediaWiki site, not on Facebook’s page as was the case for FBML. The worse that can happen is that a malicious user can imitate another user on the wiki. In no way can the other user's Facebook account be compromised.

Download Instructions
This extension is currently hosted at SourceForge. The SourceForge page should have a current download link on it. Alternatively, download the individual files through ViewVC or through SVN:

Installation
To install this extension, add the following to LocalSettings.php: Configuration parameters can also be set in 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 either be set in FBConnectConfig.php by modifying their default values, or overridden by defining them in LocalSettings.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 this config file.
 * Default value:  - Change this!

$fbApiSecret

 * Default value:  - Change this!

$fbCallbackURL
Enter your callback URL here. That's 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 here. 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:

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

$fbUseMarkup
Allows the use of XFBML in wiki text. This is currently an experimental feature and a BAD idea for public wikis. 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).
 * Default value:  (for now)

$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.

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