]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - plugins/TwitterBridge/README
Merge branch 'master' of git@gitorious.org:statusnet/mainline into testing
[quix0rs-gnu-social.git] / plugins / TwitterBridge / README
1 This Twitter "bridge" plugin allows you to integrate your StatusNet
2 instance with Twitter.  Installing it will allow your users to:
3
4     - automatically post notices to thier Twitter accounts
5     - automatically subscribe to other Twitter users who are also using
6       your StatusNet install, if possible (requires running a daemon)
7     - import their Twitter friends' tweets (requires running a daemon)
8
9 Installation
10 ------------
11
12 To enable the plugin, add the following to your config.php:
13
14     addPlugin("TwitterBridge");
15
16 OAuth is used to to access protected resources on Twitter (as opposed to
17 HTTP Basic Auth)*.  To use Twitter bridging you will need to register
18 your instance of StatusNet as an application on Twitter
19 (http://twitter.com/apps), and update the following variables in your
20 config.php with the consumer key and secret Twitter generates for you:
21
22     $config['twitter']['consumer_key']    = 'YOURKEY';
23     $config['twitter']['consumer_secret'] = 'YOURSECRET';
24
25 When registering your application with Twitter set the type to "Browser"
26 and your Callback URL to:
27
28     http://example.org/mublog/twitter/authorization
29
30 The default access type should be, "Read & Write".
31
32 * Note: The plugin will still push notices to Twitter for users who
33   have previously setup the Twitter bridge using their Twitter name and
34   password under an older versions of StatusNet, but all new Twitter
35   bridge connections will use OAuth.
36
37 Deamons
38 -------
39
40 For friend syncing and importing notices running two additional daemon
41 scripts is necessary (synctwitterfriends.php and
42 twitterstatusfetcher.php).
43
44 In the daemons subidrectory of the plugin are three scripts:
45
46 * Twitter Friends Syncing (daemons/synctwitterfriends.php)
47
48 Users may set a flag in their settings ("Subscribe to my Twitter friends
49 here" under the Twitter tab) to have StatusNet attempt to locate and
50 subscribe to "friends" (people they "follow") on Twitter who also have
51 accounts on your StatusNet system, and who have previously set up a link
52 for automatically posting notices to Twitter.
53
54 The plugin will try to start this daemon when you run
55 scripts/startdaemons.sh.
56
57 * Importing statuses from Twitter (daemons/twitterstatusfetcher.php)
58
59 To allow your users to import their friends' Twitter statuses, you will
60 need to enable the bidirectional Twitter bridge in your config.php:
61
62     $config['twitterimport']['enabled'] = true;
63
64 The plugin will then start the TwitterStatusFetcher daemon along with the
65 other daemons when you run scripts/startdaemons.sh.
66
67 Additionally, you will want to set the integration source variable,
68 which will keep notices posted to Twitter via StatusNet from looping
69 back.  The integration source should be set to the name of your
70 application, exactly as you specified it on the settings page for your
71 StatusNet application on Twitter, e.g.:
72
73     $config['integration']['source'] = 'YourApp';
74
75 * TwitterQueueHandler (daemons/twitterqueuehandler.php)
76
77 This script sends queued notices to Twitter for user who have opted to
78 set up Twitter bridging.
79
80 It's not strictly necessary to run this queue handler, and sites that
81 haven't enabled queuing are still able to push notices to Twitter, but
82 for larger sites and sites that wish to improve performance, this
83 script allows notices to be sent "offline" via a separate process.
84
85 The plugin will start this script when you run scripts/startdaemons.sh.