View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Marc Mims > POE-Component-Server-Twirc-0.15 > App::Twirc::Plugin::SecondaryAccount



Annotate this POD


New  2
Open  5
View/Report Bugs
Source   Latest Release: POE-Component-Server-Twirc-0.20


App::Twirc::Plugin::SecondaryAccount - Cross post updates to another account


  # in config (.yml in this example)
      - SecondaryAccount
          username: my_other_screen_name
          password: my_other_twitter_password
          option: fb
      - SecondaryAccount
          username: yet_another_screen_name
          password: yet_another_password

  # In your IRC client...
  # to your primary account *and* yet_another_screen_name
  post Hello, world!

  # to your primary account and both secondary accounts
  post -fb Hello, universe!

  # ... post to my_other_screen name, only
  post -fbonly Hello, alternate reality.


This plugin allows cross-posting messages to multiple accounts. In configuration, you can provide an option value. When used as an option to post, your message will be cross-posted to your primary account and the secondary account with that option value. If you do not provide an option value, all messages are cross-posted to the secondary account.

By appending only to the option value, your status will only be posted to the the account with that option value.

I use a configuration similar to the one in the synopsis to cross-post my Twitter status updates to, and optionally to Facebook. My Twitter screen name is semifor. I created an account with screen name semifor_fb and registered it with Twitter's Facebook application. In the twirc configuration file, I assigned option value fb to the account.

I created another secondary account with my screen name. In twirc configuration, I used the net_twitter_options to specify's apiurl.

Now, when I post a normal status update, it is posted to semifor on both Twitter and If I include a -fb option to post, my status update is posted to Twitter,, and Facebook. If I add a -fbonly option to post, my status update is only posted to the Facebook account.


Marc Mims <>


Copyright (c) 2009 Marc Mims

You may distribute this code and/or modify it under the same terms as Perl itself.

syntax highlighting: