Twitter follower tracker

September 18th, 2009 § 1 comment § permalink

There are a number of services out there that are supposed to notify you of when people follow or unfollow you on Twitter. I’ve tried a few and most of them seem mostly broken. The best one out there, formerly at, is currently down and its creator doesn’t know when it’s coming back, alas.

The problem with running a service like that is scaling when huge numbers of people join. It always struck me that something like this might be better handled on the client side. It’s such a conceptually simple operation (fetch followers list, do a diff with the last time you checked), and each person/computer only has to worry about their own accounts. I’m surprised that Twitter clients don’t have functionality for this built in (that I know of).

I’ve been wanting to play with the Twitter API for a while, and I’ve also wanted to delve a little bit into some of the newer features that modern web browsers have to offer, so I’ve created a simple Twitter follower tracker proof of concept in JavaScript.

Twitter follower tracker in action
It’s a very crude app. It doesn’t update automatically—you have to manually refresh the data when you want to check to see if your follower list has changed. Also, the new and lost followers are shown only with their numeric user IDs. Each ID is a link, however—clicking on the link will fetch that user’s information and convert the number into a username. Clicking again will take you to that user’s profile. I did this to minimize the quantity of Twitter API calls.

Yes, the page is hosted on my site, but all of the work is done by the browser. It uses jQuery to fetch the data from Twitter; thanks to Twitter’s handy “callback” parameter in JSON responses, I don’t have to worry about having a proxy on my server handle any cross-domain requests. I use the localStorage property, supported in some modern browsers, to remember the user’s follower history. LocalStorage is interesting and easy to use. It’s like a giant browser cookie, except that its contents don’t get sent to the server.

Caveats: it’s just a proof of concept. I’ve only tested it (minimally) on a couple of browsers, on Mac OS X. It doesn’t do any error checking. I’m sure it will break if you have a lot of followers. I’m sure it may break if you look at it funny. It may well have security issues. I’m not sure what the storage limits are for localStorage, but if you hit the limit, I have no idea what will happen. Since localStorage is in the browser, you won’t be able to see your follower history if you move to a different machine or even to a different browser on the same machine.

If you want to look under the hood, all the real work is done in follow.js. It’s not well-commented at this point—it’s kind of a mess. I might put it under some sort of open source licence, although I’m not really sure if it’s worth it for something so simple.

Give it a shot and let me know what you think :)

Twitter follower tracker.

The 4 things about UserVoice that drive me @#$%! insane

January 26th, 2009 § 3 comments § permalink

I don’t normally blog about sites that I find frustrating–it’s generally not worth the effort. But since both TweetDeck and Twhirl use UserVoice for customer feedback, I end up using it far more than I want to, and thus the frustrations build. I must vent!
» Read the rest of this entry «

The magic of TinEye

January 13th, 2009 § Comments Off on The magic of TinEye § permalink

[This post is a bit off-topic compared to the rest of the blog but I didn’t think it made sense to start a whole new blog just for one entry ;) ]

TinEye is an image search engine. But it’s not like Google Image Search: rather than searching for images by keyword, it searches for images based on an image you provide. It’s smart enough that it will find cropped, resized and otherwise modified versions of the original image.

I have gotten into the habit of using TinEye whenever someone passes along an interesting image without any source information. Here’s an example:

Just today I saw this photo album posted in my Facebook newsfeed (link requires Facebook login to view). Such a beautiful and powerful image, but it lacked a photo credit.

arm in arm

I fed the image into TinEye. Out popped a couple of pages of results, mostly blogs and forums in various forms (some were cropped differently, others had text overlaid on it like “We can coexist…”). One result in particular caught my eye: an link. The image was used on the cover of the book Christians And a Land Called Holy by Charles P. Lutz and Robert O. Smith.

Following the link, I noticed the “LOOK INSIDE” button. A couple of clicks took me to the copyright page, which said “Cover photo © Ricki Rosen/Corbis“. Bingo!

After that it was quick to determine via Google searches that Ricki Rosen is a renowned photojournalist, and a search on Corbis located the original image, available for licensing.

Where Am I?

You are currently browsing the Social media category at bunnyhero dev.