Post to Tweetie from Google Reader
August 16th, 2009 | 10,876 views | 13 Comments » | TweetAs I cave in to using yet another Google service, Google gets one step closer to becoming a hive mind.
I recently decided to ditch NetNewsWire and use Google Reader as my main RSS reader. Google Reader helps me keep up on the latest tech news and important internet trends. I’ve been really happy with it so far, except for one thing.
Google allows you to post articles that you’re reading to various social networking sites, like Twitter, Facebook, and Digg. But, Google’s built in “Post to Twitter” feature opens up a new window (or tab in Firefox’s case) at Twitter.com just to post a new tweet. Lame!
I already use an amazing Twitter client for Mac, called Tweetie. I’ve gotten used to it’s slick interface that opens a tiny little tweet window when you want to write a new tweet. It’s so much better than opening a whole new tab!
I wanted this functionality to be available to me in Google Reader. What was I to do?
Well, the company behind Tweetie, AteBits, offers up a handy bookmarklet to help users easily tweet stuff while surfing the web. You just create a new bookmark and set the URL to be:
javascript:window.location='tweetie:'+window.location
But, we can improve this by adding the title of the website to the Javscript code, which looks like this:
javascript:window.location='tweetie:'+document.title+'%20'+window.location
Then when you click on this bookmark, a new tweet pops up that looks likes this:
Awesome, right? Now, I just need to add this custom Javscript URL to Google Reader’s “Send To…” section, right?
But, it’s not that easy! Google blocks Javascript URLs (probably for security reasons or else it’s just an oversight on their part) and you get presented with this sad error mesage:
But, I want Tweetie in Google Reader, darn it! So, I whipped up a little PHP/Javascript workaround. I’ll post it here, because I imagine that others have had this same problem.
<html>
<head>
</head>
<body>
<script type="text/javascript">
<!--
window.location='tweetie:'+'<?php echo $_GET["title"]; ?>'+'%20'+'<?php echo $_GET["url"]; ?>';
window.close();
//-->
</script>
</body>
</html>
This trivial script just looks for a title and URL passed in via GET parameters, redirects the browser there, and then closes itself to get out of the way. All that remains is your new tweet window in Tweetie and Google Reader in the background.
Then, I just uploaded this file to my server (It’s located here: http://feross.org/tweetie.php in case you want to use it).
Then, I just filled out the Google Reader settings window like this:

Set up your settings like this! Remember, in Google Reader, ${title} and ${short-url} stand for the article title and URL.
Feel free to copy these settings if you’d like to set up the same functionality for yourself!
Now, I can tweet any/all the interesting stories I read from Google Reader super easily. If you follow me on Twitter, then get ready for a firestorm of tweets!
Hopefully someone finds this useful!






Great post. I knew someone had solved this issue already. Unfortunately it doesn’t seem to work for me but I’ve no doubt the problem is my end. It simply opens a window and closes it. But Tweetie is never called.
Any idea?
Hi Mark,
Thanks for the comment and tweet. It’s odd that you’re experiencing problems. Try checking to see if the Tweetie bookmarklet works by itself. Make a bookmark that points to “javascript:window.location=’tweetie:’+window.location” and see if clicking on that will launch Tweetie.
Also, what browser are you using?
Hi Feross,
I’m using both Safari and Chrome (mac). I added the tweetie bookmarklet to both browsers and still no luck. I’ve pop up blocker turned off.
Mark
That’s strange. This bookmarklet came straight off of the Tweetie website.
javascript:window.location=’tweetie:’+window.location
Are you sure you’re copying it correctly? You don’t want to copy the quotes I surrounded the code with in my last comment — you want just the javascript. I know it’s silly, but this is the most likely reason I can think of.
Scratch that — I just discovered the reason it’s not working for you.
When you copy the Javascript code and paste it into Safari or Chrome, be sure to delete the single quote characters and re-type them again yourself.
Now it should work for you.
WordPress (the software I use to publish this blog) automatically takes the straight quotes I type and converts them into curly quotes. Unfortunately, curly quotes are actually entirely different characters from straight quotes and your browser is converting the curly quotes into their URL encoded form before saving the bookmark, so the URL looks like this instead:
javascript:window.location=%E2%80%99tweetie:%E2%80%99+window.location
Let me know if it worked for you.
That did the trick! Cheers Feross. Much appreciated.
Awesome! I’m glad it worked for you!
just awesome. (; thanks for the tip
What makes an article marketing campaign effective is market reach. Maximize th use of all web syndication options around and have your ideas dispersed.
I’m still learning from you, as I’m trying to reach my goals. I absolutely liked reading everything that is written on your site. I have gone through your site and really like your content. I am running a General Web directory sitourl.com I suggest you to submit your site to my directory for free as it would enhance your site ranking in search engine and you would get more traffic.
Great post, but feross.org/tweetie.php doesn’t seem to work for me.
Can you confirm please?
Excited to use this new workaround.
Hi Prashanth,
Not sure why it’s not working for you. Can you provide some more detail? What is the exact error you are getting?
Same problem Feross !
Not working for me too!!