![]() |
||||
Home > Archive > 2009 > August > 25How to fix URL-shorteners, part IITuesday, August 25, 2009 by Dave Winer.Last Wednesday I wrote a piece that explained how to fix URL-shorteners. Today, with the help of Joe Moreno at Adjix, I implemented it. Here's how my new URL-shortener works. 1. Joe is running the shortener at adjix.com. It's the same one he's always been running, but it's got a few new features.
3. When I create a shortened URL, I do it by calling an API routine that works exactly as the APIs of the other shorteners. I give it the long URL, some identifying information so it knows to associate it with my Adjix account, and it returns a token, which I smash together with http://c.oy.ly/ to form the shortened URL. 4. All this is done with a bookmarklet communicating with a web app on one of my servers. It then takes the title of the page I'm linking to and adds the full URL from step 3, and redirects me to twitter.com, where I can edit the tweet before clicking on Update. 5. Then, every few minutes I call the Twitter API and ask if Dave has posted any new tweets. If so, I parse them, store the long and short versions of the URL in my database (by dereferencing the URL). Then I call a second API on Adjix to ask it to give me the counts for the most recent 50 links created by Dave. I then update the counts in my database, sort them, and prepare the familiar Top-40 report. Bottom-line: I am now using URL-shorteners in a way that does not make the Internet suck. I have done my good deed for the day! |
Recent stories
"The protoblogger." - NY Times. "The father of modern-day content distribution." - PC World. One of BusinessWeek's 25 Most Influential People on the Web. "Helped popularize blogging, podcasting and RSS." - Time. "The father of blogging and RSS." - BBC. "RSS was born in 1997 out of the confluence of Dave Winer's 'Really Simple Syndication' technology, used to push out blog updates, and Netscape's 'Rich Site Summary', which allowed users to create custom Netscape home pages with regularly updated data flows." - Tim O'Reilly. Dave Winer ![]() | |||
© Copyright 1994-2010 Dave Winer ![]() Last update: 5/20/2010; 5:25:34 PM Pacific. "It's even worse than it appears." ![]() |