Using bit.ly (trackable URL shortener) with Twitter Tools in Wordpress

20 Apr 2009
No Comments »

bitly screen grabI wrote in this article about using Twitter Tools with tweetburner (the twurl.nl URL shortener). I was pretty happy with this solution as it allowed me to measure (to a degree) the traffic interest in various blog posts I put up, be it for WiAU, Cognicology or this blog. It wasn’t the perfect solution however, as the version of Twitter Tools the modified update used was a little old and I always have that little nagging feeling that doesn’t go away when using modded or hacked software.

The deal-breaker for me came when I read an article reviewing the large number of URL shortener services out there. It turns out that tweetburner uses 303 redirection as opposed to 301, which is not ideal for many reasons (see this article for the reasons why, thanks to @problogger).

In the time between my first article and this discovery about the redirection, I had read in the Twitter Tools readme that the developer had created a hook in the code to allow the plugging in of a URL shortening service – the appropriate plugin for wordpress simply needed to be developed, packaged and installed.

Unfortunately, I couldn’t find a decent package for a URL shortening service using the API calls required to work with Twitter Tools on the wordpress site. After a bit of a search, I found this code snippet that implemented the bit.ly shortening service. This got me excited, because the bit.ly service was on the shortlist of services that I wanted a plugin for. It is one of the shorter URLs generated (14 chars), has some impressive usage tracking and can link multiple twitter accounts to the one bit.ly account. Ace!

I’ve taken the code snippet and packaged it into a ZIP file for upload into the Wordpress plugin manager. You can download it here.

Installing is relatively simple.

1. install and activate the Twitter Tools plugin.

2. install the Bit.ly plugin from this site.

3. BEFORE you activate the Bit.ly plugin, use the inbuilt plugin code editor for wordpress, and change the $login and $api_key values to your bit.ly account login and API key. It is in the first section of code and looks like this (change the bits in red):

function tweet_track($long_url) {
	$login = 'YOUR_LOGIN';
	$api_key = 'YOUR_API_KEY';

4. Activate the plugin.

If all is well, you should now be able to to have post submitting to Twitter, but using the bit.ly service as the URL shortener.

DISCLAIMER: This post itself is also doubling as my testing post for this method. I may or may not be embarrassed by the results.

——

UPDATE (20/4/09 ; 2.5 minutes later): It seems the plugin installation was a success!
Below is the text from my twitter status update:

New blog post: Using bit.ly (trackable URL shortener) with Twitter Tools in Wordpress http://bit.ly/bRa58

Some insight on compulsory internet filtering

05 Apr 2009
2 Comments »

This is a cross-post of this article on WiFi in Australia (which is mine, so I’m not plagiarising :P )

Last week, Insight on SBS hosted a really interesting forum to debate the compulsory internet filter that has been proposed by Senator Stephen Conroy and the incumbent Australian government.

You can watch the entire SBS broadcast here:

Insight - Blocking the net (click to play)

Insight - Blocking the net (click to play)

The proposal aims to introduce a level of compulsory internet filtering at the ISP level throughout the country to deny access to any non peer-2-peer material at has been refused classification by the Classification board or otherwise deemed illegal.

The debate offered by Insight has representation from a number of different camps. The for’s and against’s seem to be fairly evenly balanced in the program which is nice to see.

Representatives included (in a very rough order of appearance):

  • Senator Stephen Conroy
  • Sue Mclean (Cyber Safety Advisor)
  • Colin Jacobs (Electronic Fontiers Australia)
  • Mark Newton (ISP Network Engineer – Internode)
  • Some Christian guy that spouted rubbish that had nothing to do with the debate
  • and parents, both for and against.

Now, to get opinionated, I don’t believe that a compulsory filter is the answer.

I don’t have a wealth of statistics to back up my claim here, but I do have a fairly educated opinion given a high exposure and familiarity to the online medium. And my belief is that for the material they are talking about I would strongly argue that the vast majority of it is distributed through peer-to-peer networks, encrypted channels and by ‘old-fashioned’ email. And none of these methods would be filtered with the currently proposed scheme.

The end result is that people who are running these illegal material rings will still distribute it amongst themselves, the others who want to access it online will circumvent the filter, leaving the rest of us with a infrastructure-heavy filtering system that is filtering out content that we aren’t even trying to access anyway.

And the bit in bold there is the key thing.

Why put in a compulsory filter to stop people accessing material that they aren’t even going to try to access? Sure, their kids might try to get there or stumble upon it, so in those cases offer an opt-in filter that they can choose to run their connection through. The argument that it will stop those that want to access illegal material from doing so is ridiculous. This is a situation where, if there is a will, there is a way. And in this case, I imagine the ‘way’ would be a 2 minute google search…

By the way, Mike agrees with this.