<?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>John Bafford &#187; twitter</title>
	<atom:link href="http://bafford.com/tag/twitter/feed/" rel="self" type="application/rss+xml" />
	<link>http://bafford.com</link>
	<description>coding in purple</description>
	<lastBuildDate>Sat, 03 Oct 2009 19:57:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Twitterslurp open source release</title>
		<link>http://bafford.com/2009/06/30/twitterslurp-open-source-release/</link>
		<comments>http://bafford.com/2009/06/30/twitterslurp-open-source-release/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 22:44:35 +0000</pubDate>
		<dc:creator>John Bafford</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[twitterslurp]]></category>

		<guid isPermaLink="false">http://bafford.com/?p=346</guid>
		<description><![CDATA[Last month, I wrote about Twitterslurp, the twitter searching tool I developed at The Bivings Group, which displays a constantly-updating stream of tweets, as well as a leaderboard and stats graphs. Today, we are very happy to release it as open source. You can download Twitterslurp from its Google Code project page at http://twitterslurp.googlecode.com/. Since [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://bafford.com/2009/05/20/tracking-phptek-tweets-with-twitterslurp">Last month</a>, I wrote about Twitterslurp, the twitter searching tool I developed at <a href="http://www.bivings.com/">The Bivings Group</a>, which displays a constantly-updating stream of tweets, as well as a leaderboard and stats graphs.</p>
<p>Today, we are very happy to <a href="http://www.bivingsreport.com/2009/the-bivings-group-releases-twitterslurp-to-open-source-community/">release it as open source</a>. You can download Twitterslurp from its Google Code project page at <a href="http://twitterslurp.googlecode.com/"> http://twitterslurp.googlecode.com/</a>.</p>
<p>Since last month, I&#8217;ve made a lot of changes to improve the quality (and ease of configuration) of the Twitterslurp code. Twitterslurp&#8217;s error handling has been improved, and I added the ability to start and stop the tweet stream and show more than the most recent 20 tweets. Our graphics team also created a spiffy logo.</p>
<p>Yesterday and today, Twitterslurp has been driving a video wall of tweets at the <a href="http://www.personaldemocracy.com/twitter/">Personal Democracy Forum</a> conference in NYC. The conference, which just ended, had over 17,000 tweets in the last two days.</p>
<p>Previously, we ran test versions of Twitterslurp during mysqlconf and <a href="http://twitter.bivings.com/tek09/">php|tek</a>, and officially on behalf of the <a href="http://twitter.bivings.com/dpc/">Dutch PHP Conference</a>. Twitterslurp started as a project for a client to allow them to track tweets, and give members of their website rewards for tweeting with a particular hashtag.</p>
<p>We&#8217;ve also set up a copy of Twitterslurp <a href="http://twitter.bivings.com/twitterslurp/">tracking itself</a>.</p>
<p>We&#8217;d love for you to check out Twitterslurp, and we&#8217;re open to any and all feedback.</p>
]]></content:encoded>
			<wfw:commentRss>http://bafford.com/2009/06/30/twitterslurp-open-source-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tracking php&#124;tek Tweets With Twitterslurp</title>
		<link>http://bafford.com/2009/05/20/tracking-phptek-tweets-with-twitterslurp/</link>
		<comments>http://bafford.com/2009/05/20/tracking-phptek-tweets-with-twitterslurp/#comments</comments>
		<pubDate>Wed, 20 May 2009 17:03:02 +0000</pubDate>
		<dc:creator>John Bafford</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[apc]]></category>
		<category><![CDATA[flot]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[phptek]]></category>
		<category><![CDATA[tek09]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[twitterslurp]]></category>

		<guid isPermaLink="false">http://bafford.com/?p=327</guid>
		<description><![CDATA[For a client at work a few months ago, I created a Twitter search tool, Twitterslurp, that put all the tweets related to the client&#8217;s project on their webpage, updated in (close to) real-time via AJAX. I&#8217;ve since added a lot of features, including a set of graphs, and we&#8217;ve set up a version of [...]]]></description>
			<content:encoded><![CDATA[<p>For a client at <a href="http://bivings.com/">work</a> a few months ago, I created a <a href="http://twitter.com/">Twitter</a> search tool, Twitterslurp, that put all the tweets related to the client&#8217;s project on their webpage, updated in (close to) real-time via AJAX.</p>
<p>I&#8217;ve since added a lot of features, including a set of graphs, and we&#8217;ve set up a version of Twitterslurp for <a href="http://twitter.bivings.com/">php|tek 2009</a>.<br />
<span id="more-327"></span></p>
<p>Twitterslurp consists of two parts. The first is a PHP cron job that queries Twitter for new tweets matching a search string and adds them to a database. The second is JavaScript code that interfaces with a PHP script that searches the database for new tweets. In a nutshell, the JavaScript examines the web page for placeholders that represent different types of data (tweets, the leaderboard, and the graphs), and then posts to the PHP script with a JSON object detailing the data it wants. Once PHP responds, also with a JSON object, the JavaScript takes that data, formats it, and updates the page with the new content. The web page updates automatically based on an interval specified in the response object, so in the unlikely event the server came under heavy load, we would be able to easily throttle requests.</p>
<p>The new feature I&#8217;m really happy with is the <a href="http://twitter.bivings.com/stats.html">stats page</a> I&#8217;ve added, using <a href="http://jquery.com/">jQuery</a> and a graphs library called <a href="http://flot.googlecode.com/">flot</a>.</p>
<p>Flot uses the canvas tag introduced in Safari, and later supported by Firefox and Opera (and Chrome), to draw 2D images (graphs, in this case) within the browser. IE is supported with a library that implements canvas support on top of VML.</p>
<p>Flot is pretty simple to learn and use, thanks to its detailed API documentation and helpful set of examples. It actually has relatively few API functions. For the most part, you implement graphs simply by building a JavaScript object with the graph data and configuration options you want, and tell flot where to put the graph. (Twitterslurp builds this object in PHP and gives it to the JavaScript code via a JSON object.) With a few hours of work, I was able to put together the four graphs shown on the stats page, all of which have a rollover that shows the value of individual data points.</p>
<p>To lessen the server load, the stats page updates less frequently, and the graph data is cached on the server via APC, so the graph data doesn&#8217;t have to be regenerated on every request.</p>
<p>Please feel free to <a href="http://twitter.bivings.com/">take a look</a>, and let me know if you have any comments or suggestions, either here, or via Twitter (<a href="http://twitter.com/jbafford">@jbafford</a>).</p>
<p>We&#8217;re planning on taking what we&#8217;ve learned with Twitterslurp for php|tek, clean up the code (which wasn&#8217;t intended on providing graph data), adding a few more new features, and releasing it with an open source license in June. Stay tuned for more details&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://bafford.com/2009/05/20/tracking-phptek-tweets-with-twitterslurp/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
