Aaron\'s Live Writer Blog

July 1, 2010

Using bit.ly with The Twitter Notify plug-in for Live Writer

Filed under: bit.ly, Live Writer, Plug-in, Wave 3, Wave 4 — Tags: , , , , — Aaron Bregel @ 10:27 PM

One of my favorite plug-ins for Windows Live Writer is Twitter Notify which will give you the option to create a tweet on Twitter as part of publishing your blog post.  By default it uses TinyURL as the URL shortener.  The “problem” with TinyURL is that it uses 20 characters whereas newer shorteners use 17 or less characters and with the 140 character limit of Twitter every character counts.

Joe Cheng wrote a blog post, Using alternative URL shorteners with Twitter Notify plugin, and in the main article he explains how to configure the plug-in to use shorteners like is.gd, snipr.com, snurl.com, and cli.gs but I found in the comments of that post that Max Paulousky has explained how to configure it for bit.ly.  What follows are the instructions on how to setup the Twitter Notify plug-in for bit.ly.

First make sure you have the latest version of Twitter Notify.  You can download and install it from the gallery.  http://gallery.live.com/liveItemDetail.aspx?li=6b2b5ffe-936a-4cb3-869c-c01de29de176&bt=9

Second you need to know your username and API Key from bit.ly.  By default you do not need account on bit.ly to go to their site and shorten a URL but since an account is free and you can use that account in places like this plug-in or Twitter clients like Tweet Deck it is helpful to have one.  Once you have an account if you click on your username where it says “Hi username” you are taken to the page where your API key is show.  It will be something like “R_0123326902a674646d1eef0c6d86bb68”. Make a note of that API key.

Third you need to add a regkey to your registry.  Scott Lovegrove, a Live Writer MVP, has written a tool to modify the regkey for bit.ly or other URL shorteners.  I encourage you to grab the tool from his post (http://dev.scottisafool.co.uk/2010/07/02/twitter-notify-because-no-one-should-be-hacking-the-registry/) and you can just fill in your username and API Key. 

If you want to go the scarier route of editing the registry yourself and not use Scott’s tool you need to run regedit.ext on your computer.  Regedit must be run as an administrator and you may see a prompt to elevate your user privilege when you start regedit.
Navigate down to Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows Live\Writer\Preferences\PostEditor\ContentSources\CECF2903-51B3-4173-A932-76E4EE4C01CF If you do not see this key then make sure you have installed Twitter Notify.

In regedit select Edit, New, String Value and enter UrlShortener for the key Name.

For the data Value you need to enter a string that contains your bit.ly username and API key. 
http://api.bit.ly/v3/shorten?login=username&apiKey=APIKey&uri={1}&format=txt

For example, if your username with bit.ly is “lwriter” and your API Key is R_0123326902a674646d1eef0c6d86bb68 you would enter
http://api.bit.ly/v3/shorten?login=lwirter&apiKey=R_0123326902a674646d1eef0c6d86bb68&uri={1}&format=txt

At this point you can exit regedit and boot Live Writer.  The Twitter Notify plug-in will user bit.ly instead of TinyURL in your tweet.  I should note that in the plug-in itself the example text will still show tinyURL but you should see that it shows bit.ly in the text that you accept when you go to make the tweet itself.

image

Update: Changed the post to talk about Scott’s tool to modify the registry.

Blog at WordPress.com.