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