]> git.mxchange.org Git - friendica-addons.git/blob - twitter/README
Fix Libertree for new 'source' requirement of API
[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 an application for your friendica
25 instance on Twitter with
26   * read and write access
27   * don't set a callback URL
28   * we do not intend to use Twitter for login
29 The registration can be done at twitter.com/apps and you need a Twitter
30 account for doing so.
31
32 After you registered the application you get an OAuth consumer key / secret
33 pair that identifies your app, you will need them for configuration.
34
35 The inclusion of a shorturl for the original posting in cases when the
36 message was longer than 140 characters requires it, that you have *PHP5+* and
37 *curl* on your server.
38
39 ___ Where to find ___
40
41 In the Friendica git repository /addon/twitter/, this directory contains
42 all required PHP files (including the Twitter OAuth library [1] by Abraham
43 Williams, MIT licensed and the Slinky library [2] by Beau Lebens, BSD license),
44 a CSS file for styling of the user configuration and an image to _Sign in with
45 Twitter_.
46
47 [1] https://github.com/abraham/twitteroauth
48 [2] http://dentedreality.com.au/projects/slinky/
49
50 ___ Configuration ___
51
52 __ Global Configuration __
53
54 If you enabled an administrator account, please use the admin panel to configure
55 the Twitter relay. If you for any reason prefer to use a configuration file instead 
56 of the admin panels, please refer to the Alternative Configuration below. 
57
58 Activate the plugin from the plugins section of your admin panel.  When you have
59 done so, add your consumer key and consumer secret in the settings section of the 
60 plugin page.
61
62 When this is done your user can now configure their Twitter connection at
63 "Settings -> Connector Settings" and enable the forwarding of their *public*
64 messages to Twitter.
65
66 __ Alternative Configuration __
67
68 To activate this addon add @twitter@ to the list of active addons in your
69 .htconfig.php file 
70
71 $a->config['system']['addon'] = "twitter, ..."
72
73 Afterwards you need to add your OAuth consumer key / secret pair to it by
74 adding the following two lines
75
76 $a->config['twitter']['consumerkey'] = 'your consumer KEY here';
77 $a->config['twitter']['consumersecret'] = 'your consumer SECRET here';
78
79
80 __ User Configuration __
81
82 When the OAuth consumer informations are correctly placed into the
83 configuration file and a user visits the "Plugin Settings" page they can now
84 connect to Twitter. To do so one has to follow the _Sign in with Twitter_
85 button (the page will be opened in a new browser window/tab) and get a PIN from
86 Twitter. This PIN has to be entered on the settings page. After submitting the
87 PIN the plugin will get OAuth credentials identifying this user from the
88 Friendica account.
89
90 If this first step was successful the Twitter configuration will be changed
91 on the "Plugin Settings" page displaying two check boxes. One to enable/disable
92 the forwarding of *all public* postings to Twitter and one to clear the
93 personal configuration from the Twitter credentials.
94
95