My blog has moved!

You should be automatically redirected in 6 seconds. If not, visit
http://www.scienceforseo.com
and update your bookmarks.

December 03, 2008

Making Twitter bots

As some companies have figured out, there is a lot of information to be gleaned from Twitter that can benefit their business.  They can manage reputation and customer service for example.  There are however other reasons to collect information which do not involve marketing motivations but for example as I do, for research reasons.  I study the language used, behavioural analysis and that sort of thing.

You may also want to collect information for your own purposes and for this you can write your own specialised Twitter bot from scratch or use a library provided by kind souls.

Google provide some help by providing an infrastructure for you.  Using this you only need to code the logic rather than the whole thing yourself.  It interacts with the Twitter API respecting the terms of service, and manages the enrollment of followers.  The twitter account acts as the bot.  It's built on the .Net 2.0 framework. 

There are other bot code resources available in Google code, here are some nice ones:

Python-Twitter - python wrapper for the Twitter API: allows people to connect via the web, IM, and SMS.

TwitterBroadcastBot - in Ruby - broadcasts a message whenever a friend update contains a certain word.  Good for info flagging.

ContactsNearby - ASP.Net & InSTEDD- allows you to find out the geographical location of your friends on Twitter.  Plugs into Facebook too.

MadCow - python - has a whole host of features for you to use like tracking bookmarks, ip lookup, and silly things like ASCII art and loads more.  

Nathan at Flowing data has a nice tutorial on how to build your own Twitter bot, take a look - he also provides some code to get you started.  

You can automate a lot of things using CRON.  You can use UNWIN if you're on windows and not Unix.  

3 comments:

Anonymous said...

Perl hackers can use Net::Twitter to access the API. I've used it in a couple of projects and I've found it's great.

CJ said...

Excellent piece of info Andy - Thanks!

Coldbeans software said...

check out this service on the top of Twitter: http://t411.linkstore.ru
It is 411 services for Twitter

Creative Commons License
Science for SEO by Marie-Claire Jenkins is licensed under a Creative Commons Attribution-Non-Commercial-No Derivative Works 2.0 UK: England & Wales License.
Based on a work at scienceforseo.blogspot.com.