]> git.mxchange.org Git - friendica-addons.git/blob - twitter/README
56dbc7e29053084b46e81cd15087cb853a2d45e8
[friendica-addons.git] / twitter / README
1 ____ Twitter Plugin ____
2 By Tobias Diekershoff
3    tobias.diekershoff(at)gmx.net
4
5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6 !!   This addon is currently under development. If you have any problem     !!
7 !!   with it, please contact the Author.                                    !!
8 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9
10 With this addon to Friendica you can give your user the possibility to post
11 their *public* messages to Twitter. The messages will be strapped their rich
12 context and shortened to 140 characters length if necessary. If shortening of
13 the message was performed a link will be added to the Tweet pointing to the
14 original message on your server.
15
16 There is a similar addon for forwarding public messages to
17 "StatusNet":http://status.net [[StatusNet Plugin]].
18
19 Online version of this document: http://ur1.ca/35mml
20
21 ___ Requirements ___
22
23 To use this plugin you have to register your Friendica instance as an
24 _client application_ for Twitter with _read and write_ access, we do not intend
25 to use Twitter for login. The registration can be done at twitter.com/apps
26 and you need to have a Twitter account to do so.
27
28 After you registered the application you get an OAuth consumer key / secret
29 pair that identifies your app, you will need them for configuration.
30
31 The inclusion of a shorturl for the original posting in cases when the
32 message was longer than 140 characters requires it, that you have *PHP5+* and
33 *curl* on your server.
34
35 ___ Where to find ___
36
37 In the Friendica git repository /addon/twitter/, this directory contains
38 all required PHP files (including the Twitter OAuth library [1] by Abraham
39 Williams, MIT licensed and the Slinky library [2] by Beau Lebens, BSD license),
40 a CSS file for styling of the user configuration and an image to _Sign in with
41 Twitter_.
42
43 [1] https://github.com/abraham/twitteroauth
44 [2] http://dentedreality.com.au/projects/slinky/
45
46 ___ Configuration ___
47
48 __ Global Configuration __
49
50 If you enabled an administrator account, please use the admin panel to configure
51 the Twitter relay. If you for any reason prefer to use a configuration file instead 
52 of the admin panels, please refer to the Alternative Configuration below. 
53
54 Activate the plugin from the plugins section of your admin panel.  When you have
55 done so, add your consumer key and consumer secret in the settings section of the 
56 plugin page.
57
58 When this is done your user can now configure their Twitter connection at
59 "Settings -> Connector Settings" and enable the forwarding of their *public*
60 messages to Twitter.
61
62 __ Alternative Configuration __
63
64 To activate this addon add @twitter@ to the list of active addons in your
65 .htconfig.php file 
66
67 $a->config['system']['addon'] = "twitter, ..."
68
69 Afterwards you need to add your OAuth consumer key / secret pair to it by
70 adding the following two lines
71
72 $a->config['twitter']['consumerkey'] = 'your consumer KEY here';
73 $a->config['twitter']['consumersecret'] = 'your consumer SECRET here';
74
75
76 __ User Configuration __
77
78 When the OAuth consumer informations are correctly placed into the
79 configuration file and a user visits the "Plugin Settings" page they can now
80 connect to Twitter. To do so one has to follow the _Sign in with Twitter_
81 button (the page will be opened in a new browser window/tab) and get a PIN from
82 Twitter. This PIN has to be entered on the settings page. After submitting the
83 PIN the plugin will get OAuth credentials identifying this user from the
84 Friendica account.
85
86 If this first step was successful the Twitter configuration will be changed
87 on the "Plugin Settings" page displaying two check boxes. One to enable/disable
88 the forwarding of *all public* postings to Twitter and one to clear the
89 personal configuration from the Twitter credentials.
90
91