HOW TO: Use personal Bit.ly account with UrlbarExt

In: Apple| How To| Linux| Web| Windows

23 Jul 2009

UrlbarExt is a wonderful add-on for Firefox. It provides  useful tools from within the address bar of Firefox.

UrlBarExt

UrlbarExt

To quote,

UrlbarExt extends the Location Bar with set of commands to (Make Tiny URL,Copy URL,Search site,Go up,Tag pages easily ,Navigate through sequential URL’s,View page cached version,Unblock filtered websites and Surf anonymously using online phproxy servers).

This helps to shave a few key strokes from repetitive tasks. Like, copying an URL, searching a site, creating a tiny URL for a link, etc. This is one add-on that is highly recommended for power users.

I use bit.ly to create tiny URL’s. bit.ly provides statistics for each short URL. This makes for great info. However, the default bit.ly URL shortener in UrlbarExt does not save this to your account.

Follow these steps to use your bit.ly account with UrlbarExt.

  • Go to Tools -> Add-ons.
  • Find the UrlbarExt add-on and click on options.
Firefox Addons

Firefox Addons

  • Click on the Tiny tab (the second tab from left).
UrlbarExt Options

UrlbarExt Options

  • Add a new service by clicking on the + symbol. This will create a new url shortening service. Change the caption to whatever you like.
  • Enterthe following into the api column.
http://api.bit.ly/shorten
  • Enter the following into the Arguments column:
version=2.0.1&longUrl=%?url%&login=user_id&apiKey=api_key&history=1&format=xml

Replace user_id with your username and api_key with your bit.ly api key. (You can get a bit.ly api key at http://bit.ly/account). Update: Replace these terms in the string above.

  • Enter the following into the Filter column:
<shortUrl>(.+)<\/shortUrl>

This will filter the output and return the shortened url to the address bar.

  • Make sure to select this new service by clicking the radio button in the # column.
  • Click OK and you’re set.

In short, this is what I’ve done. Using the 2.0.1 version of the api, I’ve given a long URL to bit.ly and asked it to shorten the URL. bit.ly will then return the result in xml format. The shortened URL is listed within the <shortUrl> tag. Filter the resulting xml for this tag and we get the short URL.

Reference: bit.ly api documentation at http://bit.ly/s8BO.
  • Thanks for this solution! Works great. I have been awaiting response on the bit.ly support forum on this topic for months now. Thanks!
  • I'm not seeing a user_id or api_key field. I've completed the other fields as described, but I get an error when trying to use the URL bar button.
  • Hi Michael,

    There is no separate user_id or api_key field. Replace those terms in the string that you enter into the arguments column. The error is due to improper configuration.
blog comments powered by Disqus

About this blog

This website is a personal journal of interesting links, tutorials, and a test bed for publicly released projects.

Photostream

    Nikola TeslaNikola TeslaOpenNiagara Power Plant
  • teknikqa: Try uninstalling Ruby 1.8.6 first. [...]
  • about2flip: I followed this word for word. I was trying to upgrade to 1.8.7 from 1.8.6, and it still says 1.8.6 [...]
  • about2flip: I followed this word for word. I was trying to upgrade to 1.8.7 from 1.8.6, and it still says 1.8.6 [...]
  • about2flip: I followed this word for word. I was trying to upgrade to 1.8.7 from 1.8.6, and it still says 1.8.6 [...]
  • about2flip: I followed this word for word. I was trying to upgrade to 1.8.7 from 1.8.6, and it still says 1.8.6 [...]