Geeks With Blogs

Lance's TextBox

Continuing on with RSSBus scripts showing how to pipe Google Calendar to Twitter and Flickr to Twitter, here's my last Twitter RSBScript.  Here's a script to pipe any existing RSS feed to Twitter.  I wanted to sync my blog with my twitter, so now everytime I post a new blog entry, it will be added to my Twitter status.  Here's the url:

Of course you'll need to replace the querystring arguments blog_url, twitter_user, and twitter_password with your own values.

Here's what the actual script looks like, if you'd rather run it on your own server:


<rsb:info strict="true" title="Blog2Twitter" description="If new blog posts exist, they are tweeted.  Feed items are the Twitter responses.">   
input name="blog_url" req="true" />
input name="twitter_user" req="true" />
input name="twitter_password" req="true" />

rsb:call op="feedGet?feed=[blog_url | urlencode]" diff="blog2twitter-[twitter_user].xml">
<!-- set the twitter text to the blog post title -->
<rsb:set attr="twitter.text" value="New blog post: [rss:title]" />

<!--generate a tinyurl -->
<rsb:set attr="twitter.tinyurlapi" value="[rss:link]" />
<rsb:call op="httpGet?url=[twitter.tinyurlapi]">
rsb:set attr="twitter.tinyurl" value="[rss:description]" />

<!-- append the tinyurl to the twitter text, and update twitter -->

<rsb:set attr="twitter.status" value="[twitter.text] [twitter.tinyurl]" />
<rsb:call op="twitterStatusUpdate" in="twitter">
rsb:push />


Technorati Tags: ,
Posted on Monday, August 13, 2007 3:19 PM | Back to top

Comments on this post: Synching My Blog with Twitter

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Lance Robinson | Powered by: