]> git.mxchange.org Git - friendica-addons.git/blob - statusnet/README
SN/Twitter relay updated the README file
[friendica-addons.git] / statusnet / README
1 ____ StatusNet 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 any StatusNet instance (like identi.ca for example). 
12 The messages will be strapped their rich context and shortened to to the character
13 limit of the StatusNet instance in question if necessary. If shortening of the
14 message was performed a link will be added to the notice pointing to the
15 original message on your server.
16
17 There is a similar plugin to forward public messages to Twitter: Twitter Plugin.
18
19 Online version of this document: http://ur1.ca/35mpb
20
21 ___ Requirements ___
22
23 Due to the distributed nature of the StatusNet network, each user who wishes to
24 forward public messages to a StatusNet account has to get the OAuth credentials
25 for themselves, which makes this addon a little bit more user unfriendly than
26 the Twitter Plugin is. Nothing too geeky though!
27
28 The inclusion of a shorturl for the original posting in cases when the message
29 was longer than the maximal allowed notice length requires it, that you have
30 PHP5+ and curl on your server.
31 Where to find
32
33 In the Friendica git repository /addon/statusnet/, this directory contains all
34 required PHP files (including the Twitter OAuth library [1] by Abraham Williams,
35 MIT licensed and the Slinky library [2] by Beau Lebens, BSD license), a CSS file
36 for styling of the user configuration and an image to Sign in with StatusNet.
37
38 [1] https://github.com/abraham/twitteroauth
39 [2] http://dentedreality.com.au/projects/slinky
40
41 ___ Configuration ___
42
43 __ Global Configuration __
44
45 If you have configured an admin account, you can configure this plugin from
46 the admin panel. First activate it from the plugin section of the panel.
47 Afterwards you will have a separate configuration page for the plugin, where
48 you can provide a set of globally available OAuth credentials for different
49 StatusNet pages which will be available for all users of your server.
50
51 If you don't use the admin panel, you can configure the relay using the
52 .htconfig.php file of your friendica installation. To activate the relay add
53 it's name to the list of activated addons.
54
55  $a->config['system']['addon'] = "statusnet, ..."
56
57 If you want to provide preconfigured StatusNet instances for your user add the
58 credentials for them by adding
59
60 $a->config['statusnet']['sites'] = array (
61    array ('sitename' => 'identi.ca', 'apiurl' => 'https://identi.ca/api/',
62      'consumersecret' => 'OAuth Consumer Secret here', 'consumerkey' => 'OAuth
63      Consumer Key here'),
64    array ('sitename' => 'Some other Server', 'apiurl' =>
65      'http://status.example.com/api/', 'consumersecret'  => 'OAuth
66      Consumer Secret here', 'consumerkey' => 'OAuth Consumer Key here')
67 );
68
69 to the config file.
70
71 Regardless of providing global OAuth credentials for your users or not, they
72 can always add their own OAuth-Key and -Secret thus enable the relay for any
73 StatusNet instance they may have an account at.
74
75 __ User Configuration __
76
77 When the addon is activated the user has to aquire three things in order to
78 connect to the StatusNet account of choice.
79  * the base URL for the StatusNet API, for identi.ca this is
80    https://identi.ca/api/
81  * OAuth Consumer key & secret
82
83 To get the OAuth Consumer key pair the user has to (a) ask her Friendica admin
84 if a pair already exists or (b) has to register the Friendica server as a
85 client application on the StatusNet server. This can be done from the account
86 settings under "Connect -> Connections -> Register an OAuth client application
87 -> Register a new application".
88
89 During the registration of the OAuth client remember the following:
90  * there is no callback url
91  * register a desktop client
92  * with read & write access
93  * the Source URL should be the URL of your Friendica server
94
95 After the required credentials for the application are stored in the
96 configuration you have to actually connect your Friendica account with
97 StatusNet. To do so follow the Sign in with StatusNet button, allow the access
98 and copy the security code into the plugin configuration. Friendica will then
99 try to acquire the final OAuth credentials from the API, if successful the
100 plugin settings will allow you to select to post your public messages to your
101 StatusNet account.