http://diekershoff.homeunix.net/friendika/profile/tobias
tobias.diekershoff(at)gmx.net
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!! This addon is currently under development. If you have any problem !!
-!! with it, please contact the Author. !!
-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
With this addon to Friendica you can give your user the possibility to post
their *public* messages to Twitter. The messages will be strapped their rich
context and shortened to 140 characters length if necessary. If shortening of
the message was performed a link will be added to the Tweet pointing to the
original message on your server.
+The addon can also mirror a users Tweets into the ~friendica wall.
+
There is a similar addon for forwarding public messages to
"StatusNet":http://status.net [[StatusNet Plugin]].
function twitter_plugin_admin_post(&$a){
$consumerkey = ((x($_POST,'consumerkey')) ? notags(trim($_POST['consumerkey'])) : '');
$consumersecret = ((x($_POST,'consumersecret')) ? notags(trim($_POST['consumersecret'])): '');
+ $applicationname = ((x($_POST, 'application-name')) ? notags(trin($_POST['applicationname'])):'');
set_config('twitter','consumerkey',$consumerkey);
set_config('twitter','consumersecret',$consumersecret);
+ set_config('twitter','application_name',$applicationname);
info( t('Settings updated.'). EOL );
}
function twitter_plugin_admin(&$a, &$o){
'$submit' => t('Submit'),
// name, label, value, help, [extra values]
'$consumerkey' => array('consumerkey', t('Consumer key'), get_config('twitter', 'consumerkey' ), ''),
- '$consumersecret' => array('consumersecret', t('Consumer secret'), get_config('twitter', 'consumersecret' ), '')
+ '$consumersecret' => array('consumersecret', t('Consumer secret'), get_config('twitter', 'consumersecret' ), ''),
+ '$applicationname' => array('applicationname', t('Name of the Twitter Application'), get_config('twitter','applicationname'),t('set this to avoid mirroring postings from ~friendica back to ~friendica'))
));
}