<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bunnyhero dev &#187; Twitter</title>
	<atom:link href="http://www.bunnyhero.org/category/twitter/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bunnyhero.org</link>
	<description>Notes on iPhone, Flash and Web development</description>
	<lastBuildDate>Mon, 07 Nov 2011 21:49:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Twitter follower tracker</title>
		<link>http://www.bunnyhero.org/2009/09/18/twitter-follower-tracker/</link>
		<comments>http://www.bunnyhero.org/2009/09/18/twitter-follower-tracker/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 03:42:16 +0000</pubDate>
		<dc:creator>bunnyhero</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Social media]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.bunnyhero.org/?p=232</guid>
		<description><![CDATA[There are a number of services out there that are supposed to notify you of when people follow or unfollow you on Twitter. I&#8217;ve tried a few and most of them seem mostly broken. The best one out there, formerly at joule.marnanel.org, is currently down and its creator doesn&#8217;t know when it&#8217;s coming back, alas. [...]]]></description>
			<content:encoded><![CDATA[<p>There are a number of services out there that are supposed to notify you of when people follow or unfollow you on <a href="http://twitter.com/">Twitter</a>. I&#8217;ve tried a few and most of them seem mostly broken. The best one out there, formerly at <strong>joule.marnanel.org</strong>, is currently down and <a href="http://marnanel.livejournal.com/1280059.html">its creator doesn&#8217;t know when it&#8217;s coming back</a>, alas.</p>
<p>The problem with running a service like that is scaling when huge numbers of people join. It always struck me that something like this <strong>might be better handled on the client side</strong>. It&#8217;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&#8217;m surprised that Twitter clients don&#8217;t have functionality for this built in (that I know of).</p>
<p>I&#8217;ve been wanting to play with the <a href="http://apiwiki.twitter.com/">Twitter API</a> for a while, and I&#8217;ve also wanted to delve a little bit into some of the newer features that modern web browsers have to offer, so I&#8217;ve created a simple <a href="http://bunnyherolabs.com/follow/">Twitter follower tracker</a> proof of concept in JavaScript.</p>
<p><a href="http://www.bunnyhero.org/wp-content/uploads/2009/09/Picture-48.png"><img class="aligncenter size-medium wp-image-236" title="Twitter follower tracker in action" src="http://www.bunnyhero.org/wp-content/uploads/2009/09/Picture-48-300x169.png" alt="Twitter follower tracker in action" width="300" height="169" /></a><br />
It&#8217;s a very crude app. It doesn&#8217;t update automatically&mdash;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&mdash;clicking on the link will fetch that user&#8217;s information and convert the number into a username. Clicking again will take you to that user&#8217;s profile. I did this to minimize the quantity of Twitter API calls.</p>
<p>Yes, the page is hosted on my site, but <strong>all of the work is done by the browser</strong>. It uses <a href="http://jquery.com/">jQuery</a> to fetch the data from Twitter; thanks to Twitter&#8217;s handy <a href="http://apiwiki.twitter.com/Things-Every-Developer-Should-Know#5Parametershavecertainexpectations">&#8220;callback&#8221; parameter</a> in JSON responses, I don&#8217;t have to worry about having a proxy on my server handle any cross-domain requests. I use the <a href="http://hacks.mozilla.org/2009/06/localstorage/"><code>localStorage</code></a> property, supported in some modern browsers, to remember the user&#8217;s follower history. LocalStorage is interesting and easy to use. It&#8217;s like a giant browser cookie, except that its contents don&#8217;t get sent to the server.</p>
<p><strong>Caveats:</strong> it&#8217;s just a proof of concept. I&#8217;ve only tested it (minimally) on a <a href="http://www.apple.com/safari/">couple</a> of <a href="http://www.getfirefox.com/">browsers</a>, on Mac OS X. <strong>It doesn&#8217;t do <em>any</em> error checking</strong>. I&#8217;m sure it will break if you have a lot of followers. I&#8217;m sure it may break if you look at it funny. It may well have security issues. I&#8217;m not sure what the storage limits are for <code>localStorage</code>, but if you hit the limit, I have no idea what will happen. Since <code>localStorage</code> is in the browser, you won&#8217;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.</p>
<p>If you want to look under the hood, all the real work is done in <a href="http://bunnyherolabs.com/follow/follow.js"><code>follow.js</code></a>. It&#8217;s not well-commented at this point&mdash;it&#8217;s kind of a mess. I might put it under some sort of open source licence, although I&#8217;m not really sure if it&#8217;s worth it for something so simple.</p>
<p>Give it a shot and let me know what you think :)</p>
<p><a href="http://bunnyherolabs.com/follow/"><strong>Twitter follower tracker.</strong></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.bunnyhero.org/2009/09/18/twitter-follower-tracker/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

