gnu-social/plugins/TwitterBridge
2011-05-05 23:24:49 +02:00
..
daemons TwitterBridge fix: merge down remaining 64-bit Snowflake ID fixes for twitterstatusfetcher.php from 0.9.x 2011-01-18 11:08:32 -08:00
locale Localisation updates from http://translatewiki.net. 2011-05-05 23:24:49 +02:00
scripts Update Twitter calls to use documented API endpoints 2010-12-17 15:57:22 -08:00
jsonstreamreader.php Fix up Twitter JSON formatting to be consistent between the polling and streaming API interfaces; basic stream tester can now import your notices (ooooh) 2010-10-05 14:26:11 -07:00
Notice_to_status.php Fix for failure edge case in TwitterBridge outgoing repeat/retweets. 2010-11-12 13:06:41 -08:00
README move notice_to_status initialization code to run-once script 2010-09-08 16:10:07 -04:00
Sign-in-with-Twitter-lighter.png 'Sign in with Twitter' button img 2010-01-28 18:47:12 +00:00
tweetctlqueuehandler.php Work in progress on twitter import daemon 2010-10-29 14:12:40 -07:00
tweetinqueuehandler.php TweetInQueueHandler: run incoming tweets through the queues to keep the Twitter streaming daemon clear. 2010-10-29 13:14:12 -07:00
Twitter_synch_status.php * i18n/L10n updates 2010-09-18 17:45:18 +02:00
twitter.php L10n update. 2011-03-25 09:55:33 +01:00
twitteradminpanel.php Flush router cache when saving Twitter admin settings: adding/removing keys can enable/disable some actions. This avoids having users' Twitter settings unreachable after adding your keys to an installation with TwitterBridge on but not pre-configured. 2010-11-30 12:46:33 -08:00
twitterauthorization.php L10n tweaks. 2011-04-01 22:35:23 +02:00
TwitterBridgePlugin.php Tweak which should fix ActivityStreams output for Twitter profiles (if remote_profile entries didn't match, we ended up losing id/URI). 2011-03-30 11:22:32 -07:00
twitterimport.php Workaround for reply timeline since_id issue: save the notice.created value into reply.modified, so we can key off it as expected. 2011-02-25 13:22:13 -08:00
twitterlogin.php TwitterBridge uses Plugin::staticPath() 2011-02-03 11:03:24 -05:00
twitteroauthclient.php Update Twitter calls to use documented API endpoints 2010-12-17 15:57:22 -08:00
twitterqueuehandler.php Quick hack to discard twitter broadcast queue items on failure *IF* config option 'twitter' 'ignore_errors' is on: 2010-12-07 12:11:37 -08:00
twittersettings.php Switch Twitter bridge settings page to be a ProfileSettingsAction, as ConnectSettingsAction is gone 2011-02-28 12:22:21 -08:00
twitterstreamreader.php Prelim --all mode on streamtest.php to use site streams; doesn't use the destination user for import yet, and not actually tested yet until I'm whitelisted for the beta. :) 2010-10-05 17:08:04 -07:00

Twitter Bridge Plugin
=====================

This Twitter "bridge" plugin allows you to integrate your StatusNet
instance with Twitter.  Installing it will allow your users to:

    - automatically post notices to their Twitter accounts
    - automatically subscribe to other Twitter users who are also using
      your StatusNet install, if possible (requires running a daemon)
    - import their Twitter friends' tweets (requires running a daemon)
    - allow users to authenticate using Twitter ('Sign in with Twitter')

Installation
------------

OAuth 1.0a (http://oauth.net) is used to to access protected resources
on Twitter (as opposed to HTTP Basic Auth)*.  To use Twitter bridging
you will need to register your instance of StatusNet as an application
on Twitter (http://twitter.com/apps).  During the application
registration process your application will be assigned a "consumer" key
and secret, which the plugin will use to make OAuth requests to Twitter.
You can either pass the consumer key and secret in when you enable the
plugin, or set it using the Twitter administration panel**.

When registering your application with Twitter set the type to "Browser"
and your Callback URL to:

    http://example.org/mublog/twitter/authorization

(Change "example.org" to your site domain and "mublog" to your site
path.)

The default access type should be "Read & Write".

To enable the plugin, add the following to your config.php:

    addPlugin(
        'TwitterBridge',
        array(
            'consumer_key'    => 'YOUR_CONSUMER_KEY',
            'consumer_secret' => 'YOUR_CONSUMER_SECRET'
        )
    );

or just:

   addPlugin('TwitterBridge');

if you want to set the consumer key and secret from the Twitter bridge
administration panel.  (The Twitter bridge wont work at all
unless you configure it with a consumer key and secret.)

* Note: The plugin will still push notices to Twitter for users who
  have previously set up the Twitter bridge using their Twitter name and
  password under an older version of StatusNet, but all new Twitter
  bridge connections will use OAuth.

** For multi-site setups you can also set a global consumer key and
   secret.  The Twitter bridge will fall back on the global key pair if
   it can't find a local pair, e.g.:

   $config['twitter']['global_consumer_key']    = 'YOUR_CONSUMER_KEY';
   $config['twitter']['global_consumer_secret'] = 'YOUR_CONSUMER_SECRET';

Upgrade
-------

If you've used the Twitter bridge plugin prior to version 0.9.5,
you'll need to run the new scripts/initialize_notice_to_status.php
script to initialize the new notice-to-status mapping file, which
greatly improves the integration between StatusNet and Twitter.

Administration panel
--------------------

As of StatusNet 0.9.0 there is a new administration panel that allows
you to configure Twitter bridge settings within StatusNet itself,
instead of having to specify them manually in your config.php.  To enable
the administration panel, you will need to add it to the list of active
administration panels.  You can do this via your config.php. E.g.:

    $config['admin']['panels'][] = 'twitter';

And to access it, you'll need to use a user with the "administrator"
role (see: scripts/userrole.php).

Sign in with Twitter
--------------------

With 0.9.0, StatusNet optionally allows users to register and
authenticate using their Twitter credentials via the "Sign in with
Twitter" pattern described here:

    http://apiwiki.twitter.com/Sign-in-with-Twitter

The option is _on_ by default when you install the plugin, but it can
disabled via the Twitter bridge administration panel, or by adding the
following line to your config.php:

    $config['twitter']['signin'] = false;

Daemons
-------

For friend syncing and importing Twitter tweets, running two
additional daemon scripts is necessary: synctwitterfriends.php and
twitterstatusfetcher.php.

In the daemons subdirectory of the plugin are three scripts:

* Twitter Friends Syncing (daemons/synctwitterfriends.php)

Users may set a flag in their settings ("Subscribe to my Twitter friends
here" under the Twitter tab) to have StatusNet attempt to locate and
subscribe to "friends" (people they "follow") on Twitter who also have
accounts on your StatusNet system, and who have previously set up a link
for automatically posting notices to Twitter.

The plugin will start this daemon when you run scripts/startdaemons.sh.

* Importing statuses from Twitter (daemons/twitterstatusfetcher.php)

You can allow uses to enable importing of your friends' Twitter
timelines either in the Twitter bridge administration panel or in your
config.php using the following configuration line:

    $config['twitterimport']['enabled'] = true;

The plugin will then start the TwitterStatusFetcher daemon along with the
other daemons when you run scripts/startdaemons.sh.

Additionally, you will want to set the integration source variable,
which will keep notices posted to Twitter via StatusNet from looping
back.  You can do this in the Twitter bridge administration panel, or
via config.php. The integration source should be set to the name of your
application _exactly_ as you specified it on the settings page for your
StatusNet application on Twitter, e.g.:

    $config['integration']['source'] = 'YourApp';

* TwitterQueueHandler (daemons/twitterqueuehandler.php)

This script sends queued notices to Twitter for user who have opted to
set up Twitter bridging.

It's not strictly necessary to run this queue handler, and sites that
haven't enabled queuing are still able to push notices to Twitter, but
for larger sites and sites that wish to improve performance the script
allows notices to be sent "offline" via a separate process.

StatusNet will automatically use the TwitterQueueHandler if you have
enabled the queuing subsystem.  See the "Queues and daemons" section of
the main README file for more information about how to do that.