// Internet Duct Tape

Broadcasting RSS Feeds with Twitterbot in Less Than 5 Minutes

Posted in RSS Syndication, Technology, Twitter by engtech on March 22, 2007

twitter logoEveryone is all atwitter about the Twitter web service. It’s a web-based broadcast instant messaging application where you can send updates by email or by SMS mobile. It has a limitation of 140 characters and is a lot like how people have always used their instant messenger away status (or their Facebook status). Like all public web communication people will lose their jobs and destroy relationships over Twitter before they realize that it’s all public, it’s all archived, and it’s all searchable (but you can restrict messages to only go to friends).

I’m not going to use Twitter to start posting all of the trivialities of my life, but I *am* interested in using it to broadcast my blog posts, my del.icio.us bookmarks, and the occasional aside (you can friend me here). Here is how you can do something similar using a program called Twitterbot by R. Tyler Ballance at the Unethical Blogger.

By the end of this guide you’ll have a program up and running that will download RSS feeds and broadcast them over your Twitter account.

There is a fast guide (download the program directly) and a not-as-fast guide (download the source code to the program).

UPDATE 2007/03/24: If running something like this on your own computer seems like a pain in the ass, take a look at twitterfeed.com which will do the same thing for you. Thanks for the link, Mario.

UPDATE: 2007/03/26: Someone has created an rss2twitter application.

UPDATE: 2007/03/29: WordPress Plugin for automatically pinging your Twitter account with new blog posts.

UPDATE: 2007/04/03: I’ve switched to use twitterfeed.com and I’m liking it.

This article will outline how to use twitterbot to run your own server. Casual users should seriously consider twitterfeed/rss2twitter.

But what is it good for?

Why would you want to broadcast RSS feeds to your Twitter account? Well, RSS is becoming the glue of the Internet. Any web app worth it’s salt offers an RSS feed, usually many. So that really opens up the possibilities for the types of notifications you could use this for.

  • Post links to photos from your Flickr photostream
  • Post links to your latest blog posts
  • Bookmark links in del.icio.us and automatically share them with your friends
  • Post links to your StumbleUpon shared bookmarks
  • Post links to your Digg submissions
  • Post links whenever one of your blog posts is submitted to Digg (be careful because Digg bans at the drop of a hat these days)

The Fast Guide

Download Twitterbot

  1. Download and unzip Twitterbot
  2. Install Mono if you don’t already have Microsoft .NET Framework installed
    • Mono is an open source, cross-platform version of .NET

Enter Your Feeds

  1. Edit feeds.sample.xml with Wordpad (Right click, open with Wordpad)
    • It was created on Unix so Notepad will have issues with the formatting — use Wordpad
  2. Fill in the name and url of the RSS feed you want to broadcast as well as the name and password of your twitter account.
    <feeds>
    <feed name="//engtech" url="http://feeds.feedburner.com/engtech/"
     twitter="engtech" password="twitterpassword"/>
    </feeds>
    • You can use more than one feed.
    • Be careful with the & symbol! You have to convert it to &
      • Another reason why YAML is better for configs than XML :)
  3. Save the file.

Running Twitterbot from a Batch File

This is for Windows users. Unix/Mac guys can run twitterbot directly from the command line using “mono Twitterbot.exe”.

  1. Right click and choose New >> Text Document and rename it to twitterbot.bat
  2. Right click twitterbot.bat and choose Edit
  3. Copy the following into Notepad:
    @echo off
    Twitterbot.exe feeds.sample.xml 30 yes
    echo Twitterbot exited
    pause
  4. If you do not have Microsoft .NET installed and are using Mono change the second line to:
    mono Twitterbot.exe feeds.sample.xml 30 yes
  5. Double click on twitterbot.bat to run it.

Now you have a program running on your computer that will periodically update twitter with your RSS feed. Many thanks to R. Tyler Ballance at the Unethical Blogger for writing this! You can add me to your Twitter friendslist by clicking on this link.

Twitterbot output Twitter log chat instant messanging

The only pain is that you need a computer that is on all the time for running Twitterbot on. Or you could add twitterbot.bat to your Start Menu >> Startup folder so that it starts every time you reboot your computer.

Issues

  • It is meant to run forever. If you start and stop the program it will send out duplicates.
  • If it has a lot of URLs to post it doesn’t space them out nicely (again, meant to run forever so not a large issue).
  • It doesn’t keep trying to post a link on failure (TinyUrl and Twitter can both time out because of being overloaded).

Troubleshooting

If you see the following it means you didn’t put in the correct password for your Twitter account.

Received exception!
System.Net.WebException: The remote server returned an error: (401) Unauthorized
.
at System.Net.HttpWebRequest.GetResponse()
at Twitterbot.PostToTwitter(Feed feed, String post)
[2007-03-22 12:50:42 AM] Failed to post to twitter!

The Not As Fast Guide

Most people should use the Fast Guide up above. This one checks out the Twitterbot source code from Subversion instead of downloading it as a zip file.

Download Twitterbot Using TortoiseSVN (Windows)

  1. Install TortoiseSVN
  2. Open Windows Explorer (press WindowsKey-E)
  3. Create a new directory/folder called twitterbot
  4. Right-click on the twitterbot directory and choose SVN Checkout
    tortoisesvn subversion checkout command menu
  5. Enter this URL and press Ok
    svn://svn.geekisp.com/bleep/trunk/Twitterbot
    
    tortoisesvn subversion url twitterbot twitter

OR Download Twitterbot Under Linux

  1. Create a directory for twitterbot
  2. Run this command:
    svn co svn://svn.geekisp.com/bleep/trunk/Twitterbot

This will download the files, now follow the same instructions as in the quick guide above starting at “Enter Your Feeds”.

Related Posts

20 Responses

Subscribe to comments with RSS.

  1. TheShortFatKid said, on March 22, 2007 at 9:23 pm

    Very cool. I also just discovered tumblr.com that will aggregate all of your feeds into a blog and rss feed. Here is mine – http://guy.tumblr.com/. I have added my blog posts, links, yelps, twitters, flickrs, and cocomments. Not that anyone would ever want all that, but it’s fun to play around with.

  2. engtech said, on March 22, 2007 at 9:45 pm

    I looked at Tumblr a few weeks ago, but I didn’t notice they have a feature that lets you import feeds — thanks for the heads up.

    I’ve also been playing around with Profilactic as a way of mashing together various sites.

    http://www.profilactic.com/mashup/engtech

  3. Ryan said, on March 22, 2007 at 11:37 pm

    I think Jaiku is a much better example. Or Suprglu (though their servers are similarly overwhelmed). And yeah, Profilactic, though I never noticed if you could get an outgoing RSS feed for your “mashup.”

    I imagine Twitter will support this natively if they want to grow in the “presence” space (and not just inane IM space!).

  4. links for 2007-03-22 said, on March 23, 2007 at 3:36 am

    [...] Broadcasting RSS Feeds with Twitterbot in Less Than 5 Minutes « //engtech “By broadcasting RSS feeds to Twitter you can do cool things like send automatic updates to your friends when you Digg stories, submit stories, post photos or write on your blog.” A Windows .exe that polls for your feeds and posts updates to Twitter (tags: twitter rss syndication interruption windows opensource open_source tool broadcast notification) [...]

  5. Nitallica said, on March 23, 2007 at 4:43 am

    Very nice! Thanks for sharing. :)

  6. engtech said, on March 23, 2007 at 5:31 am

    Thanks for the suggestions, Ryan. I just saw Suprglu (very cool).

    With all the hype around Yahoo Pipes! I would have though someone would have set it up to output to various APIs like Twitter, Del.icio.us and Facebook.

    (edit: just looked at the facebook api and it doesn’t seem to have a way to post shares)

  7. Eric Berlin said, on March 23, 2007 at 6:10 am

    Great and comprehensive overview !

    You bring up a lot of good points. One that particularly struck me is that some people have a better sense of communicating in the “public” realm of the Internet than others. It really does help to use the old rule of thinking about what your spouce/kids/boss/*potential* bosses might think about everything you publish for the rest of your life, period, because as you say it’s all indexed and can be found for someone who wants to take the effort.

  8. [...] Broadcasting RSS Feeds with Twitterbot in Less Than 5 Minutes « //engtech (tags: Blog guide opensource rss windows twitter broadcast) [...]

  9. [...] Engtech also recommends the option of broadcasting your WordPress.com or full version WordPress blog post updates on to your Twitter strea…. [...]

  10. [...] Broadcasting RSS feeds with TwitterBox in less than 5 minutes by engtech [...]

  11. Mario said, on March 24, 2007 at 9:27 pm

    As an alternative, if you don’t want to run any software yourself, you could try http://twitterfeed.com , an experimental site/service I created myself, which lets you post your blog updates to a twitter account automatically.

  12. engtech said, on March 25, 2007 at 2:09 am

    *very cool* Mario, I was waiting for someone to set something like that up.

    If you’re security-minded you can run it yourself, if you aren’t then use Mario’s server. :)

  13. [...] ad utilizzare Twitter per inviare alert dei post che avete pubblicato sul blog è possibile integrare il vostro Feed Rss con Twitterbot: questo uso può essere davvero interessante, non credi ? [...]

  14. meish dot org » Twit by name… said, on March 27, 2007 at 9:01 pm

    [...] (shudder) to Twitter via mail. Remember when blogging via email was the big thing? Plus you can use twitterbot to broadcast RSS feeds – something both the BBC and The Guardian news services have been experimenting with recently – and [...]

  15. [...] Broadcasting RSS Feeds with Twitterbot from Engtech. [...]

  16. [...] I am getting the daily horoscopes from Astrology.com’s RSS feeds.  I am currently using Twitterbot to post the horoscopes to my account.  There are some other online web apps I may switch to which [...]

  17. [...] Broadcasting RSS Feeds with Twitterbot in Less Than 5 Minutes « //engtech (tags: twitter rss broadcast) [...]

  18. [...] uno que explica posibles usos profesionales y otro que explica cómo utilizar twitter para anunciar las actualizaciones de un blog (yo creía que para eso estaban los feeds RSS… [...]

  19. [...] twit tools and they aren’t available for those of us on wordpress.com so I found twitterbot. Another option is twitterfeed but I couldn’t get it to work. I’m also a little leary [...]

  20. [...] Broadcasting RSS Feeds with Twitterbot in Less Than 5 Minutes « // Internet Duct Tape (tags: blog resources rss tool tools twitter) [...]


Comments are closed.

Follow

Get every new post delivered to your Inbox.

Join 287 other followers

%d bloggers like this: