The Problem

Over the course of the day I should use a lot of different Twitter accounts, for the various business and groups I am involved in.

@scotthewitt @huddersfieldWOP @theaudiopodcast @thisweeksrant @inclusiveimprov @helo_group

However multiple accounts in the browser is hard work.

At first I tried multiple browsers which works until you a; run out of browsers and b run out of memory.

Next I tried TweetDeck which is a great interface for working in but I found the multiple account management awkward and that it never really let me work with just one account quickly when it needed to be my sole focus.

Currently I am working with Python Twitter Tools (PTT) simple to install and allows you to run from the command line interactively.

The real key though is that you can opt to use different files for the oauth login.

Install PTT

To install from the terminal type

easy_install twitter

Account Setup

Make sure you are logged in to the Twitter account you want to use in the browser.

At the the command line just type

twitter

and follow the instructions.

This will give you single account Twitter from the command line.

To setup multiple accounts

Rename the created authentication file .twitter_oauth (you will find it in your home directory) to something meaningful.

mv .twitter_oauth .business_twitter_oauth

Then in the web browser login to another Twitter account and repeat the setup process

Multi User

If you want to set a default account then name the authentication file .twitter_oauth.
I prefer not to have a default so I have to explicitly set the account I wish to tweet from.

To send a tweet you just have to selected the authentication file you wish to use to tweet from. So to tweet from the business account created in the example above,

twitter --oauth .business_twitter_oauth set hello twitter

Easy Multi User

Of course an easier way of doing this is use an alias.

alias BTwitter='twitter --oauth .business_twitter_oauth'

*If you like colour in the terminal use this alias instead

  • alias BTwitter='twitter --oauth .business_twitter_oauth -f ansi'

Now if I want to read my Business Tweets I can just type

BTwitter

and to Tweet from the account

BTwitter set Hello Twitter

Hope that is useful to people dont forget you can follow me on Twitter @scotthewitt.