A Twitter Bookmarklet that Doesn’t Suck

Edit: This bookmarklet still works, but the new official Twitter one is pretty decent too, because it uses Twitter’s own URL shortener which (when all clients adopt it, Twitterfall does) will mean your URL will be shown in full in people’s timelines – alleviating security worries.

I’ve tried a few Twitter bookmarklets in the past. Some don’t shorten the URL, some require you to either hand over your credentials or log in via oAuth (boring!), some don’t take the title from the page you are on.

So I’ve decided to make my own based on what I like doing. It was really easy (literally a few lines of PHP and Javascript), and it’s really simple to use. Here’s why it doesn’t suck:

  • It tries to shorten the URL using is.gd. If it fails for some reason it’ll just resort to using the unshortened URL. is.gd has a really simple API; I know bit.ly would be more useful, but I’ve never used the bit.ly API. Maybe one day, I made this in 10 minutes after all.
  • It uses a nice tweet format. It puts the title, and the shortened URL, into a nice format of “Reading ‘title’ URL”.
  • You don’t have to give me your password. It doesn’t use any fancy automatic posting that requires you to give over your credentials, it just takes you to the Twitter home page (provided you are logged in, if not then it will log you in through Twitter as normal) with the status filled in, so you can add your own comment or whatever.
  • It opens in a new window, so you can close it afterwards.

There might be some bugs, let me know if you spot anything or have any ideas.

Installing

Drag one of the links below (choose how you want it to work) to your bookmarks bar / wherever to create the bookmarklet.

Only opens a new window: Share on Twitter

Will open in current window if popup is blocked (delicious bookmarklet behaviour): Share on Twitter

This entry was posted in Blog, Noteworthy. Bookmark the permalink.