]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/Facebook/README
454dd44e794a8255c2a64b3fedf25ddb9d26f97c
[quix0rs-gnu-social.git] / plugins / Facebook / README
1 *** WARNING ***
2 This plugin is deprecated as of StatusNet 0.9.7, and will soon be removed
3 completely from the StatusNet codebase. Please install or upgrade to the
4 new "Facebook Bridge" (plugins/FacebookBridge) plugin ASAP.
5 ***************
6
7 Facebook Plugin
8 ===============
9
10 This plugin allows you to use Facebook Connect with StatusNet, provides
11 a Facebook canvas application for your users, and allows them to update
12 their Facebook statuses from StatusNet.
13
14 Facebook Connect
15 ----------------
16
17 Facebook connect allows users to register and login using nothing but their
18 Facebook credentials. With Facebook Connect, your users can:
19
20 - Authenticate (register/login/logout -- works similar to OpenID)
21 - Associate an existing StatusNet account with a Facebook account
22 - Disconnect a Facebook account from a StatusNet account
23
24 Built-in Facebook Application
25 -----------------------------
26
27 The plugin also installs a StatusNet Facebook canvas application that
28 allows your users to automatically update their Facebook status with
29 their latest notices, invite their friends to use the app (and thus your
30 site), view their notice timelines and post notices -- all from within
31 Facebook.  The application is built into the StatusNet Facebook plugin
32 and runs on your host.
33
34 Quick setup instructions*
35 -------------------------
36
37 Install the Facebook Developer application on Facebook:
38
39     http://www.facebook.com/developers/
40
41 Use it to create a new application and generate an API key and secret.
42 You will need the key and secret so cut-n-paste them into your text
43 editor or write them down.
44
45 In Facebook's application editor, specify the following URLs for your app:
46
47 - Canvas Callback URL         : http://example.net/mublog/facebook/app/
48 - Post-Remove Callback URL    : http://example.net/mublog/facebook/app/remove
49 - Post-Authorize Redirect URL : http://apps.facebook.com/yourapp/
50 - Canvas Page URL             : http://apps.facebook.com/yourapp/
51 - Connect URL                 : http://example.net/mublog/
52
53     *** ATTENTION ***
54     These URLs have changed slightly since StatusNet version 0.8.1,
55     so if you have been using the Facebook app previously, you will
56     need to update your configuration!
57
58 Replace "example.net" with your host's URL, "mublog" with the path to your
59 StatusNet installation, and 'yourapp' with the name of the Facebook
60 application you created. (If you don't have "Fancy URLs" on, you'll need to
61 change http://example.net/mublog/ to http://example.net/mublog/index.php/).
62
63 Additionally, Choose "Web" for Application type in the Advanced tab. In the
64 "Canvas setting" section, choose the "FBML" for Render Method, "Smart Size"
65 for IFrame size, and "Full width (760px)" for Canvas Width. Everything else
66 can be left with default values.
67
68 * NOTE: For more under-the-hood detailed instructions about setting up a
69         Facebook application and getting an API key, check out the
70         following pages on the Facebook wiki:
71
72     http://wiki.developers.facebook.com/index.php/Connect/Setting_Up_Your_Site
73     http://wiki.developers.facebook.com/index.php/Creating_your_first_application
74
75 Finally you must activate the plugin by adding it in your config.php
76 (this is where you'll need the API key and secret generated earlier):
77
78     addPlugin(
79         'Facebook',
80         array(
81             'apikey' => 'YOUR_APIKEY',
82             'secret' => 'YOUR_SECRET'
83         )
84     );
85
86 Administration Panel
87 --------------------
88
89 As of StatusNet 0.9.0 you can alternatively specify the key and secret
90 via a Facebook administration panel from within StatusNet, in which case
91 you can just add:
92
93     addPlugin('Facebook');
94
95 to activate the plugin.
96
97 NOTE: To enable the administration panel you'll need to add it to the
98 list of active administration panels, e.g.:
99
100     $config['admin']['panels'][] = 'facebook';
101
102 and of course you'll need a user with the administrative role to access
103 it and input the API key and secret (see: scripts/userrole.php).
104
105 Testing It Out
106 --------------
107
108 If the Facebook plugin is enabled and working, there will be a new Facebook
109 Connect Settings tab under each user's Connect menu. Users can connect and
110 disconnect* to their Facebook accounts from it.
111
112 To try out the plugin, fire up your browser and connect to:
113
114     http://example.net/mublog/main/facebooklogin
115
116 or, if you do not have fancy URLs turned on:
117
118     http://example.net/mublog/index.php/main/facebooklogin
119
120 You should see a page with a blue button that says: "Connect with Facebook"
121 and you should be able to login or register.
122
123 From within Facebook, you should also be able to get to the Facebook
124 application, and run it by hitting the link you specified above when
125 configuring it:
126
127     http://apps.facebook.com/yourapp/
128
129 That link should be present you with a login screen.  After logging in to
130 the app, you are given the option to update their Facebook status via
131 StatusNet.
132
133 * Note: Before a user can disconnect from Facebook, she must set a normal
134   StatusNet password.  Otherwise, she might not be able to login in to her
135   account in the future.  This is usually only required for users who have
136   used Facebook Connect to register their StatusNet account, and therefore
137   haven't already set a local password.
138
139 Offline Queue Handling
140 ----------------------
141
142 For larger sites needing better performance it's possible to enable
143 queuing and have users' notices posted to Facebook via a separate
144 "offline" process -- FacebookQueueHandler (facebookqueuhandler.php in
145 the Facebook plugin directory).  It will run automatically if you have
146 enabled StatusNet's offline queueing subsystem.  See the "Queues and
147 daemons" section in the StatusNet README for more about queuing.
148
149
150 TODO
151 ----
152
153 - Make Facebook Connect work for authentication for multi-site setups
154   (e.g.: *.status.net)
155 - Posting to Facebook user streams using only Facebook Connect
156 - Invite Facebook friends to use your StatusNet installation via Facebook
157   Connect
158 - Auto-subscribe Facebook friends already using StatusNet
159 - Share StatusNet favorite notices to your Facebook stream
160 - Allow users to update their Facebook statuses once they have authenticated
161   with Facebook Connect (no need for them to use the Facebook app if they
162   don't want to).
163 - Import a user's Facebook updates into StatusNet