1 This plugin allows you to use Facebook Connect with StatusNet, provides a
2 Facebook application for your users, and allows them to update their
3 Facebook statuses from StatusNet.
8 Facebook connect allows users to register and login using nothing but their
9 Facebook credentials. With Facebook Connect, your users can:
11 - Authenticate (register/login/logout -- works similar to OpenID)
12 - Associate an existing StatusNet account with a Facebook account
13 - Disconnect a Facebook account from a StatusNet account
15 Built-in Facebook Application
16 -----------------------------
18 The plugin also installs a StatusNet Facebook application that allows your
19 users to automatically update their Facebook statuses with their latest
20 notices, invite their friends to use the app (and thus your site), view
21 their notice timelines, and post notices -- all from within Facebook. The
22 application is built into the StatusNet Facebook plugin and runs on your
25 Quick setup instructions*
26 -------------------------
28 Install the Facebook Developer application on Facebook:
30 http://www.facebook.com/developers/
32 Use it to create a new application and generate an API key and secret. Add a
33 Facebook app section of your config.php and copy in the key and secret,
36 // Config section for the built-in Facebook application
37 $config['facebook']['apikey'] = 'APIKEY';
38 $config['facebook']['secret'] = 'SECRET';
40 In Facebook's application editor, specify the following URLs for your app:
42 - Canvas Callback URL : http://example.net/mublog/facebook/app/
43 - Post-Remove Callback URL: http://example.net/mublog/facebook/app/remove
44 - Post-Add Redirect URL : http://apps.facebook.com/yourapp/
45 - Canvas Page URL : http://apps.facebook.com/yourapp/
46 - Connect URL : http://example.net/mublog/
49 These URLs have changed slightly since StatusNet version 0.8.1,
50 so if you have been using the Facebook app previously, you will
51 need to update your configuration!
53 Replace "example.net" with your host's URL, "mublog" with the path to your
54 StatusNet installation, and 'yourapp' with the name of the Facebook
55 application you created. (If you don't have "Fancy URLs" on, you'll need to
56 change http://example.net/mublog/ to http://example.net/mublog/index.php/).
58 Additionally, Choose "Web" for Application type in the Advanced tab. In the
59 "Canvas setting" section, choose the "FBML" for Render Method, "Smart Size"
60 for IFrame size, and "Full width (760px)" for Canvas Width. Everything else
61 can be left with default values.
63 * NOTE: For more under-the-hood detailed instructions about setting up a
64 Facebook application and getting an API key, check out the
65 following pages on the Facebook wiki:
67 http://wiki.developers.facebook.com/index.php/Connect/Setting_Up_Your_Site
68 http://wiki.developers.facebook.com/index.php/Creating_your_first_application
70 Finally you must activate the plugin by adding the following line to your
73 addPlugin('Facebook');
78 If the Facebook plugin is enabled and working, there will be a new Facebook
79 Connect Settings tab under each user's Connect menu. Users can connect and
80 disconnect* to their Facebook accounts from it.
82 To try out the plugin, fire up your browser and connect to:
84 http://SITE/PATH_TO_STATUSNET/main/facebooklogin
86 or, if you do not have fancy URLs turned on:
88 http://SITE/PATH_TO_STATUSNET/index.php/main/facebooklogin
90 You should see a page with a blue button that says: "Connect with Facebook"
91 and you should be able to login or register.
93 From within Facebook, you should also be able to get to the Facebook
94 application, and run it by hitting the link you specified above when
97 http://apps.facebook.com/yourapp/
99 That link should be present you with a login screen. After logging in to
100 the app, you are given the option to update their Facebook status via
103 * Note: Before a user can disconnect from Facebook, she must set a normal
104 StatusNet password. Otherwise, she might not be able to login in to her
105 account in the future. This is usually only required for users who have
106 used Facebook Connect to register their StatusNet account, and therefore
107 haven't already set a local password.
109 Offline Queue Handling
110 ----------------------
112 For larger sites needing better performance it's possible to enable queuing
113 and have users' notices posted to Facebook via a separate "offline"
114 FacebookQueueHandler (facebookqueuhandler.php in the Facebook plugin
115 directory), which will be started by the plugin along with their other
116 daemons when you run scripts/startdaemons.sh. See the StatusNet README for
117 more about queuing and daemons.
122 - Invite Facebook friends to use your StatusNet installation via Facebook
124 - Auto-subscribe Facebook friends already using StatusNet
125 - Share StatusNet favorite notices to your Facebook stream
126 - Allow users to update their Facebook statuses once they have authenticated
127 with Facebook Connect (no need for them to use the Facebook app if they
129 - Re-design the whole thing to support multiple instances of StatusNet