<?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>Snipe.Net &#187; Search Results  &#187;  index.php</title>
	<atom:link href="http://www.snipe.net/search/index.php/feed/rss2/" rel="self" type="application/rss+xml" />
	<link>http://www.snipe.net</link>
	<description>Bitterness never tasted so sweet</description>
	<lastBuildDate>Tue, 24 Jan 2012 04:30:40 +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>Upgrading to WordPress 3.0 and Adding Multi-Site</title>
		<link>http://www.snipe.net/2010/06/upgrading-to-wordpress-3/</link>
		<comments>http://www.snipe.net/2010/06/upgrading-to-wordpress-3/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 06:09:49 +0000</pubDate>
		<dc:creator>snipe</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[PHP/mySQL]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wpmu]]></category>

		<guid isPermaLink="false">http://www.snipe.net/?p=3071</guid>
		<description><![CDATA[WordPress 3.0, code name “Thelonious”, has been released, and it brings multi-site functionality as part of the core. As someone with far too many blogs of my own, I thought this would be a great time to start switching them all over, and let you know what you&#8217;re in for if you choose to do [...]]]></description>
			<content:encoded><![CDATA[<p>WordPress 3.0, code name “Thelonious”, has been released, and it brings multi-site functionality as part of the core. As someone with far too many blogs of my own, I thought this would be a great time to start switching them all over, and let you know what you&#8217;re in for if you choose to do the same.<br />
<span id="more-3071"></span><br />
Previously, if you wanted to run multiple sites from one core installation of WordPress, you would install <a href="http://mu.wordpress.org/">WPMU</a>. </p>
<p>I had tossed that idea around a lot over the past year, since I run several websites that run on WordPress, but I had heard from enough people who ran into plugin/MU conflict issues that made things go &#8216;splody &#8216;splody that I opted not to. So instead, every time a new version of WordPress came out, I&#8217;d end up upgrading around 20 installs. Blech.</p>
<p>With version 3.0 of WordPress, the ability to create multiple sites using one install of WordPress is built right into the core, so no need to fool around with WPMU. The temptation was too great this time, so I decided to give it a whack. It was not what I would call a smooth process, but it wasn&#8217;t terrible either.</p>
<blockquote><p><strong>STOP: </strong>If you are already running WPMU and you just want to figure out how to upgrade your existing WPMU sites to WordPress 3.0, you&#8217;re reading the wrong article.  <a href="http://developersmind.com/2010/06/17/upgrading-wordpress-mu-2-9-2-to-wordpress-3-0/">Try this one instead</a>.</p></blockquote>
<h3>Goals</h3>
<p>What I wanted to get out of this was to have one main core install, but run multiple sites on their own domains that all pulled from that main core, so upgrading to later versions would mean upgrading one core instead of a dozen or two.  These properties remaining at their current separate domain names (such as www.crankyhaiku.com, www.geekhaiku.com etc) was critical, both because of search engine optimization and for branding reasons.</p>
<h3>Upgrading</h3>
<p>The normal upgrade part was flawless, as WordPress upgrades tend to be these days. Automatic upgrade has never quite worked for me, so I always do a manual upgrade. It takes longer to upload the files, but it&#8217;s a pretty painless process. So to upgrade to 3.0, I did the usual: </p>
<ul>
<li>backup (which I didn&#8217;t actually have to do, since I automatically backup to the Amazon Cloud every night using <a href="http://www.webdesigncompany.net/automatic-wordpress-backup/">Automatic WordPress Plugin</a>) but I&#8217;m paranoid</li>
<li>delete the wp-admin directory</li>
<li> delete the wp-includes directory</li>
<li>upload everything in the WordPress package &#8211; except for wp-content &#8211; to the web root</li>
<li>hit the upgrade script to trigger the database updates</li>
</ul>
<p>Flawless, as usual. Not so much as a hiccup. Now came the trickier part &#8211; adding the &#8220;Network&#8221; functionality previously available in WPMU to start to consolidate sites.</p>
<h3>Creating a Multi-Site Network</h3>
<p>I can&#8217;t speak for how easy or difficult this normally was with WPMU, so unfortunately I can&#8217;t tell you how this process compares to a normal WPMU setup. It wasn&#8217;t awful, but it was definitely buggy.</p>
<p>The WordPress documentation on <a href="http://codex.wordpress.org/Create_A_Network">Creating a Network</a> walks through the basics well enough, so I suggest you start there so you know what to expect.</p>
<p><strong>Note: You will not be able to go through the wizard in your WordPress admin until you deactivate ALL of your plugins. You can obviously re-enable them later, but I found that many of them did not keep their original settings.</strong> </p>
<p>I suspect this might be because I chose &#8220;network activate&#8221; instead of just plain &#8220;activate&#8221;. I had wanted to make those plugins available for all sites in the network, and didn&#8217;t realize that it would wipe out my existing snipe.net settings when I did so. Oh well. (Incidentally, that explains why you might see some weird stuff on the site until I have a chance to go through everything one by one. Double &#8220;related posts&#8221; bits at the end of the articles, Apture wasn&#8217;t working, etc.) All of the settings are fixable, but it may take you a little time to figure out what&#8217;s been lost, and what you have to do to set it back to the way it was before.</p>
<h4>Editing Your wp-config.php</h4>
<p>Beyond the setup in your WordPress admin, you&#8217;ll need to make a few changes to your wp-config.php file and your htaccess file. I hadn&#8217;t updated my wp-config for several versions, so I decided to use the wp-config-sample.php file and just pull my existing database variables over. Whether you use your old wp-config.php or start fresh with the stock WordPress sample, you&#8217;ll need to add the following to your wp-config.php, just <em>above</em> the comment that says &#8220;/* That&#8217;s all, stop editing! Happy blogging. */&#8221;</p>
<p><code>define( 'MULTISITE', true );<br />
define( 'SUBDOMAIN_INSTALL', true );<br />
$base = '/';<br />
define( 'DOMAIN_CURRENT_SITE', 'www.yoursite.com' );<br />
define( 'PATH_CURRENT_SITE', '/' );<br />
define( 'SITE_ID_CURRENT_SITE', 1 );<br />
define( 'BLOG_ID_CURRENT_SITE', 1 );</code></p>
<p>If you followed my suggestion and read the <a href="http://codex.wordpress.org/Create_A_Network">WordPress documentation on creating a network</a> (you did read that, right?), you&#8217;ll see that you have two choices for how your network will be set up: sub-domain (blah1.yourdomain.com, blah2.yourdomain.com) or directory-based (yourdomain.com/blah1, yourdomain.com/blah2). Make sure you think this one through before you get started, since there doesn&#8217;t seem to be an easy way to switch between the two.</p>
<p>As I mentioned, I didn&#8217;t want my sites to live at subdomain.snipe.net, or snipe.net/blogname &#8211; I wanted them to live at their own urls. I also didn&#8217;t want a bunch of crap littering up my document root. The easiest way to do this on Rackspace Cloud Sites is through a combination of setting up a site alias, and using mod_rewrite to handle domains:</p>
<ul>
<li>Set up a <a href="http://help.rackspacecloud.com/article.php?id=077">domain alias</a>, like secondblog.com, and point it to originalblog.com</li>
<li>Modify the mod_rewrite rules in your htaccess access file </li>
<li>In your site preferences, point the blog url to the aliased domain name </li>
</ul>
<p>If you&#8217;re not on Rackspace Cloud Sites, you can just follow the directions in the WordPress documentation.</p>
<h4>Tweaking Your .htaccess</h4>
<p>You&#8217;ll need to make sure the bit below is in your htaccess file &#8211; but your WordPress Network Setup wizard will point that out to you anyway <img src='http://www.snipe.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><code>RewriteCond %{REQUEST_FILENAME} -f [OR]<br />
RewriteCond %{REQUEST_FILENAME} -d<br />
RewriteRule ^ - [L]<br />
RewriteRule . index.php [L]</code></p>
<p>One thing to look out for besides having to reset your plugin preferences: when I created my Network, setting this site as the default, it automatically tried to set the url as snipe.net/blog. I&#8217;m not sure why it did this, and I&#8217;m certain I didn&#8217;t add it anywhere, but when I committed the changeover to Network, all of my urls were broken (since snipe.net/blog/ doesn&#8217;t exist). It was a quick change that you can handle via the Settings menu, but watch out for it and be sure to test your links once you&#8217;ve made the switch. </p>
<h3>Importing Blogs</h3>
<p>Now that you&#8217;ve got a Network set up, you have actually add them to the Network so that they&#8217;re using the same core. I expected this to be a much bigger pain in the ass than it ended up being. All I had to do was go to the original admin, go to TOOLS > EXPORT and download the XML file. Then go into my WordPress 3.0 admin, select the site I wanted to admin, and go to TOOLS > IMPORT > WORDPRESS, and upload the XML file. Worked perfectly, so far as I can tell.</p>
<h3>Security Notes</h3>
<p>Consolidating all of your WordPress sites into one multi-site install has many benefits, the most obvious one being that it&#8217;s easier to maintain one core install than updating every single instance of WordPress you run. That said, you may want to consider a few things:</p>
<p>While one install is probably more &#8220;secure&#8221; than multi-installs in the real world simply because you&#8217;re more likely to keep one site updated than dozens, there are a few things to consider.</p>
<p>If you run multiple WordPress blogs under the same user (the same account, in Rackspace Cloud Sites), all of the files are owned by the same linux user and group. This means that if one of your WordPress installs ends up compromised, either because you forgot to upgrade one of them, or because of a <a href="http://blog.unmaskparasites.com/2010/06/14/attack-on-wordpress-blogs-on-rackspace/">vulnerability in your hosting company</a>, once an attacker has access to one of your blog installs, they have access to any other files owned by that user. Which means all of your other blogs, even the ones that are running current WordPress versions.</p>
<p>Along this same line of thought, if you&#8217;re running multiple WordPress installs under different users and you end up consolidating them to take advantage of the multi-site functionality, do so understanding that in this scenario, all of your blogs will be owned by the same user/group in the same webspace, so one vulnerability could easily turn into a much bigger problem. </p>
<p>Conversely, <a href="http://blog.unmaskparasites.com/2010/06/14/attack-on-wordpress-blogs-on-rackspace/">tracking down backdoors and maliciously modified files</a> could potentially be easier, since you have fewer installs to search through.</p>
<p>WordPress has been much better about quickly patching holes, and being proactive about finding vulnerabilities. If your site ends up getting hacked, these days it&#8217;s more likely to be a vulnerable plugin, an outdated install you forgot all about, or a PC virus that added your FTP login to a botnet &#8211; not the core WordPress install itself. I say this with a certain amount of confidence, since I have restored <em>at least</em> two-dozen hacked WordPress sites (not mine) since the beginning of the year, and have therefore spent countless hours investigating the attack, identifying the vector, and writing up summaries to post to <a href="http://badwarebusters.org/">badwarebusters.org</a> in an effort to help other people facing the same hack.</p>
<p>To be clear, running a multi-site install isn&#8217;t any riskier than running multiple blogs under the same user. But if you&#8217;re currently running your blogs under different users, you should at least be aware of how that could potentially impact you. </p>
<h3>Final Thoughts</h3>
<p>My thought is that it might have been smarter to install WPMU, and then upgrade to 3.0, since the upgrade process for a WPMU setup to 3.0 seems like it was a little less wonky, but I don&#8217;t really know.</p>
<p>I&#8217;ve really only just started playing with this during the fragment of free time I had today (work has been brutal for the past month or so). So far, pulling the theme in has been as simple as downloading them from their respective old WordPress installs and uploading them to the new 3.0 themes directory and activating them so that they&#8217;re available to the rest of the sites in the network. </p>
<p>And certainly, if you&#8217;ve found an easier way to get this done, please let me know in the comments. <img src='http://www.snipe.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

 <script type="text/javascript">
	<!--
		function onover(what){
	document.getElementById('blurbtext').innerHTML=''+what+'';
	}
	function onout(){
	document.getElementById('blurbtext').innerHTML='&nbsp;';
	}
	-->
	</script>



<h3 style="padding-bottom: 0px; margin-bottom: 0px;">Also check out: <br /><span id="blurbtext"><br /></span></h3>

<div id="relatedposts">




		
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2010/11/wordpress-security-book/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2010/11/secure-wordpress.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Upcoming WordPress Security Book" height="90" width="90" onmouseover="onover('Upcoming WordPress Security Book')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2009/01/essential-wordpress-plugins/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2009/01/blog_logo.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Essential WordPress Plugins" height="90" width="90" onmouseover="onover('Essential WordPress Plugins')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2009/01/creating-a-wordpress-theme/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2009/01/wordpress-logo.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Creating A WordPress Theme" height="90" width="90" onmouseover="onover('Creating A WordPress Theme')" onmouseout="onout()" /></a></div>

	</div>

]]></content:encoded>
			<wfw:commentRss>http://www.snipe.net/2010/06/upgrading-to-wordpress-3/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Using Google Analytics on Facebook Fan Pages</title>
		<link>http://www.snipe.net/2010/04/google-analytics-on-facebook-fan-pages/</link>
		<comments>http://www.snipe.net/2010/04/google-analytics-on-facebook-fan-pages/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 19:56:17 +0000</pubDate>
		<dc:creator>snipe</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[analytics]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook fan pages]]></category>
		<category><![CDATA[metrics]]></category>
		<category><![CDATA[reporting]]></category>

		<guid isPermaLink="false">http://www.snipe.net/?p=3008</guid>
		<description><![CDATA[Can you use Google Analytics on Facebook fan pages and fan page walls? You betcher sweet ass you can. If you&#8217;ve ever created a Facebook fan page, you&#8217;ve probably realized that the &#8220;reporting&#8221; that Facebook provides is basically useless. Because Facebook limits the Javascript you can use on Fan Pages, you cannot implement your own [...]]]></description>
			<content:encoded><![CDATA[<p>Can you use Google Analytics on Facebook fan pages and fan page walls? You betcher sweet ass you can.</p>
<p><span id="more-3008"></span></p>
<p>If you&#8217;ve ever created a Facebook fan page, you&#8217;ve probably realized  that the &#8220;reporting&#8221; that Facebook provides is basically useless. Because Facebook limits the Javascript you can use on Fan Pages, you  cannot implement your own analytics packages on fan pages. Or at least, that&#8217;s what they want you to believe.</p>
<p>For Facebook applications, there is an FBML tag that will allow you <a href="http://wiki.developers.facebook.com/index.php/Fb:google-analytics" target="_blank">place your Google Analytics code on the canvas page</a> &#8211; but <strong>this FBML will not work on fan pages, application tabs, or <em>anywhere</em> other than the canvas page</strong>.</p>
<p>Fortunately, implementing Google Analytics on your Facebook fan page is possible, with a little PHP trickery. The basic gist of the workaround is to include your Google Analytics code as an image instead of placing the javascript into the FBML code.</p>
<p>Rather than writing something from scratch, it makes more sense to direct you to <a href="http://www.webdigi.co.uk/blog/2010/google-analytics-for-facebook-fan-pages/" target="_blank">a post on the Webdigi blog</a> that offers a free set of PHP scripts that will let you do exactly that.</p>
<p>The long and short of what the guys over at Webdigi are doing with their scripts is simply to call a PHP script instead of an actual image file in the &lt;img src&gt; code. This is not unlike the &#8220;tracking pixels&#8221; that are often used in email newsletters, since Javascript is not an option there either. So the concept isn&#8217;t new, but it&#8217;s not common knowledge that it works on Facebook.</p>
<p>The PHP script they are calling contains the Google Analytics code, and accepts parameters so that you can re-use the script on multiple fan pages (or different pages in an application) simply by setting different parameters.</p>
<p>When your Static FBML tab, application tab or non-canvas app page loads, it loads that &#8220;image&#8221; as part of the page. That &#8220;image&#8221; then pings the PHP script, which pings Google Analytics. This could be adapted for other reporting systems as well, using the same concepts.</p>
<p>The guys do a nice job with their script, and they even offer a <a href="http://ga.webdigi.co.uk/" target="_blank">wizard</a> that helps you figure out what you need to put where.</p>
<p>I had rigged up a script a few months ago, but I never really had the  time to package it for the general public, make it easy to configure,  and so on, so go ahead and check out their script package.</p>
<p>Using this method, you’ll even be able to <strong>set up funnels and goals</strong> for your Facebook fan page stats, and Webdigi offers a great breakdown  on how to<strong> <a href="http://www.webdigi.co.uk/blog/2010/tracking-user-engagement-on-facebook-fan-pages/" target="_blank">tell the difference between fan and non-fan activity</a></strong> on your fan pages in your reporting.</p>
<p>Enjoy!</p>

 <script type="text/javascript">
	<!--
		function onover(what){
	document.getElementById('blurbtext').innerHTML=''+what+'';
	}
	function onout(){
	document.getElementById('blurbtext').innerHTML='&nbsp;';
	}
	-->
	</script>



<h3 style="padding-bottom: 0px; margin-bottom: 0px;">Also check out: <br /><span id="blurbtext"><br /></span></h3>

<div id="relatedposts">




		
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2008/11/let-me-google-that-for-you/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2008/11/googlelogoonwall-thumb.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="No, No &#8211; Let Me Google That For You" height="90" width="90" onmouseover="onover('No, No &#8211; Let Me Google That For You')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2008/06/compare-website-stats-using-google-trends/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2008/06/trends_cropped.png&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Compare Website Stats Using Google Trends" height="90" width="90" onmouseover="onover('Compare Website Stats Using Google Trends')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2002/06/google-style-page-numbering-with-x-per-page-and-y-page-numbers-displayed/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2008/06/picture-22.png&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Google Style Page Numbering (with x per page and y page numbers displayed)" height="90" width="90" onmouseover="onover('Google Style Page Numbering (with x per page and y page numbers displayed)')" onmouseout="onout()" /></a></div>

	</div>

]]></content:encoded>
			<wfw:commentRss>http://www.snipe.net/2010/04/google-analytics-on-facebook-fan-pages/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>An Open Letter to Rackspace Cloud Hosting</title>
		<link>http://www.snipe.net/2010/01/an-open-letter-to-rackspace-cloud-hosting/</link>
		<comments>http://www.snipe.net/2010/01/an-open-letter-to-rackspace-cloud-hosting/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 00:07:55 +0000</pubDate>
		<dc:creator>snipe</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[rackspace]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://www.snipe.net/?p=2851</guid>
		<description><![CDATA[I just received an automated email from Rackspace that made my brain melt. It&#8217;s no secret that a lot of websites have been hacked lately. One thing they seem to have in common is that they&#8217;re all running WordPress, and a lot of them are hosted at the Rackspace Cloud. Dear Alison, Since we host [...]]]></description>
			<content:encoded><![CDATA[<p>I just received an automated email from Rackspace that made my brain melt. It&#8217;s no secret that a lot of websites have been hacked lately. </p>
<p>One thing they seem to have in common is that they&#8217;re all running WordPress, and <a href="http://benmetcalfe.com/blog/2010/01/wordpress-to-be-currently-considered-unsafe/">a lot of them are hosted at the Rackspace Cloud</a>.</p>
<p><span id="more-2851"></span></p>
<blockquote><p>Dear Alison,</p>
<p>Since we host hundreds of thousands of applications at The Rackspace Cloud, we have a unique vantage point from which we can identify security trends and patterns. Lately, the industry has seen an elevated level of attempts to take advantage of code vulnerabilities in the software powering websites. Hackers are a common and persistent threat to any website, but there are steps you can take to protect yourself and to make your websites and applications harder to exploit.</p>
<p>Please read over the important tips below. We have dedicated security experts who work to protect our infrastructure, but since we can&#8217;t fix or upgrade code on behalf of our customers, it&#8217;s important for you to know and regularly implement security best practices in the code you run. We need your help and involvement to ensure your own sites are as protected as possible. If you have any questions about security, please reply to this email and we&#8217;ll  be happy to help.</p>
<p>HERE&#8217;S WHAT OUR SECURITY TEAM HAS RECENTLY IDENTIFIED:</p>
<p>1. The current data that we&#8217;ve collected points to application-based vulnerabilities being exploited. Hackers commonly scan sites for insecure applications, plugins, or other pieces of code and then work to take advantage of the software exploits they find.</p>
<p>2. Applications using the popular blogging software WordPress appear to be mostly targeted, but WordPress isn&#8217;t the sole target of the malicious groups / persons.</p>
<p>3. Your site does not have to be high-profile to be targeted. Hackers often scan random sites for signs of software known to be vulnerable (older versions of popular software with publicly known security holes, for example).</p>
<p>HERE&#8217;S WHAT YOU SHOULD DO NOW TO PROTECT YOUR SITES:</p>
<p>1. This is probably the most important tip: For any application you use, be sure to maintain the most current stable version. Often, an application might be updated to a new minor version solely to address a security hole that&#8217;s been discovered. Be sure to subscribe to any news lists and feeds available for your applications to make sure you are aware of updated versions as soon as they are released.</p>
<p>2. Many applications, like WordPress, have optional plugins developed by the community. Since these add-ons are often not as well vetted, it&#8217;s extremely important to carefully evaluate and manage third party application plugins, themes, or other functionality that is introduced to a running web application. Most hackers are exploiting these plug-ins</p>
<p>3. It&#8217;s imperative to choose strong passwords. Randomly generated strings of letters, numbers, and symbols are best. Avoid words and phrases in your passwords. The unfortunate reality: passwords that are easy to remember are also easy to guess. (Ex: Replacing o by the number 0 is not a recommended tactic.)</p>
<p>4. Change your passwords on a regular basis and change them immediately when you have any hunch that your site may have been attacked.</p>
<p>5. Be as restrictive as possible with users and file permissions. Remove write permissions from files that aren&#8217;t likely to change frequently. Some programs have install files that should be deleted after installation. If you&#8217;ve installed something or written code for testing purposes or experimentation, it&#8217;s best to remove it afterwards. Only keep the files and code on your account that are active and necessary.</p>
<p>As a site owner, you need to take an active role in guaranteeing security of your code and applications. The good news is that our support staff is happy to help you with any questions or concerns you may have. Recovering from a hack or exploit is extremely time-consuming and frustrating. The preventive steps outlined above can make a world of difference in keeping your sites secure.</p>
<p>Finally, if you suspect your site has already been compromised, you should take immediate action. This knowledge base article can help you through the right steps:</p>
<p><a href="http://cloudsites.rackspacecloud.com/index.php/Recovering_from_and_Dealing_with_a_Site_Compromise">http://cloudsites.rackspacecloud.com/index.php/Recovering_from_and_Dealing_with_a_Site_Compromise</a></p>
<p>Sincerely,<br />
The Rackspace Cloud Security Team </p></blockquote>
<p>I want to preface this by saying there are a LOT of people that work at Rackspace that are absolutely awesome. The guys I know from Twitter are amazing, and helpful and care about customer happiness more than I can even say. None of this is their fault. This is NOT about them. This is about something fundamentally wrong with priorities at Rackspace, in my opinion.</p>
<p>I replied:</p>
<blockquote><p>Too little, too late. I could have (and did) tell you all of this already.</p>
<p>And unfortunately, running the most recent version of WordPress doesn&#8217;t help. This week, I have personally had to repair 11 WordPress websites hosted on the RS Cloud that were hacked, all were running 2.9.1 and had very few plugins in common. The plugins they do have in common, like WP-Supercache, are plugins Rackspace suggests to keep the CPU-cycle raping down to a minimum. And WP-Supercache is a mature plugin that is very well supported so it seems unlikely (although certainly not impossible) that it is the vector.</p>
<p>And thanks to your logfiles not being able to be viewed in real time (as they are owned by root), this leaves web developers that actually have a clue very few options for forensically backtracking the vector.</p>
<p>I would like to know what Rackspace is doing to help developers isolate these issues? Are logfiles being programmatically reviewed for malicious traffic? Without SSH access and the ability to tail apache logs, we cannot do this ourselves within any kind of timeframe that will be useful in preventing or mitigating an attack. If I am going to continue hosting with Rackspace, I want to be assured that Rackspace is actually doing something to help us protect ourselves other than send emails that overstate the obvious.</p>
<p>Your support staff, at least most of the level 1 techs, are completely and utterly incapable of handling anything relating to hacks. They are slow and under-educated, regardless of how well meaning they might be.</p>
<p>You guys are in the position where you can help isolate these vectors. What steps are you taking? You need to up your game, or I&#8217;m bailing, and likely taking a lot of people with me. There is a lot of buzz going around about these vulnerabilities being specific to Rackspace Cloud, as it seems the vast, vast majority of the WordPress hacks have been on RS CS hosted sites.</p>
<p>I have confronted several of your higher-ups in the Cloud, including CTO John Engates, multiple times over the past year, begging for better tools to monitor security, offering to pay extra for them. Simple tools that even terrible, insecure Cpanel servers have. The entire purpose of Mosso, when it was created, was to target web developers &#8211; at least that&#8217;s how it was pitched to me. Web developers. Professionals. Many of us with over a decade of experience in this business. You deny us SSH and real-time Apache logs, but do nothing to provide us with any tools we would need without access to those basics &#8211; and then to add insult to injury, you send us a form letter that tells us to use good passwords and keep WordPress up to date? If your target is still the web development community, it&#8217;s time to nut up or shut up. We&#8217;re already doing all of these things, and we&#8217;re still getting fucked. It makes us look bad, it costs us time and money, and the trust of our clients.</p>
<p>Your customers are under attack, and I want to know what you plan to do to help us protect ourselves and our clients, or I am taking my business to a company that values my time and reputation.</p></blockquote>
<p>I would not have published this letter to my blog if this were not something that I have been asking for, over and over and over, for the entire year I&#8217;ve been with Rackspace Cloud. I have tried to keep my issues with Rackspace off the grid, because overall I have felt like they&#8217;ve been trying to work with me to keep me happy. But this was just too much.</p>
<p>No one is sorrier than I am that it came to this. </p>

 <script type="text/javascript">
	<!--
		function onover(what){
	document.getElementById('blurbtext').innerHTML=''+what+'';
	}
	function onout(){
	document.getElementById('blurbtext').innerHTML='&nbsp;';
	}
	-->
	</script>



<h3 style="padding-bottom: 0px; margin-bottom: 0px;">Also check out: <br /><span id="blurbtext"><br /></span></h3>

<div id="relatedposts">




		
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2010/03/the-cloud-is-a-lie/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2010/03/tornado_OPT.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="The Cloud is a Lie" height="90" width="90" onmouseover="onover('The Cloud is a Lie')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2011/01/security-keynote/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2011/01/donkey_balls.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Security Keynote Download" height="90" width="90" onmouseover="onover('Security Keynote Download')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2010/06/upgrading-to-wordpress-3/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2010/06/wordpress-mug.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Upgrading to WordPress 3.0 and Adding Multi-Site" height="90" width="90" onmouseover="onover('Upgrading to WordPress 3.0 and Adding Multi-Site')" onmouseout="onout()" /></a></div>

	</div>

]]></content:encoded>
			<wfw:commentRss>http://www.snipe.net/2010/01/an-open-letter-to-rackspace-cloud-hosting/feed/</wfw:commentRss>
		<slash:comments>52</slash:comments>
		</item>
		<item>
		<title>Microsoft Web Developer&#8217;s Summit 2009</title>
		<link>http://www.snipe.net/2009/12/mswds09/</link>
		<comments>http://www.snipe.net/2009/12/mswds09/#comments</comments>
		<pubDate>Sun, 06 Dec 2009 03:20:31 +0000</pubDate>
		<dc:creator>snipe</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[PHP/mySQL]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[mswds]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://www.snipe.net/?p=2557</guid>
		<description><![CDATA[I had the opportunity this week to go out to Redmond, Washington to attend the Microsoft Web Developer&#8217;s Summit at the MS headquarters. For this summit, about 25 leaders in the PHP (and PHP project) community were invited out to sit down with members of the MS product development teams and provide critical, honest feedback [...]]]></description>
			<content:encoded><![CDATA[<p>I had the opportunity this week to go out to Redmond, Washington to attend the Microsoft Web Developer&#8217;s Summit at the MS headquarters. For this summit, about 25 leaders in the PHP (and PHP project) community were invited out to sit down with members of the MS product development teams and provide critical, honest feedback about Microsoft.<br />
<span id="more-2557"></span></p>
<h3>Background</h3>
<p>The MSWDS is one of only four significant annual events within the PHP community (others include tek, DPC and ZendCon), and this summit is a bit harder to get invited to. Unlike most other conferences, where all you need is the cash to pony up for a conference pass and a hotel room to crash in, invites are very limited and attendees are selected because they have had some interaction with the folks at Microsoft, and are believed to be leaders and influencers within the open source community. To be blunt, these summits cost Microsoft a lot of money, so they need to make sure they&#8217;re getting the best bang for their buck.</p>
<p><img src="http://www.snipe.net/wp-content/uploads/2009/12/IMG_0065-sm.jpg" alt="IMG_0065-sm" title="IMG_0065-sm" width="200" height="126" class="alignright size-full wp-image-2577" />Keeping that in mind, it would be easy to assume that we were being brought out there so that Microsoft could pitch us on the latest and greatest Microsoft products, trying to get the movers and shakers of open source to drink the corporate kool-aid and switch to Microsoft products. While more acceptance of Microsoft products within the open source community is obviously a goal, they are making a concerted effort to learn from us &#8211; what we need, where they are falling short, and how we can move forward together.</p>
<h3>Discussions and Format</h3>
<p>The summit itself was a total of three days, with the last day being optional for those open source developers who were willing to sign an NDA to discuss some of Microsoft&#8217;s emerging technology. During the three days, different representatives from Microsoft&#8217;s product teams sat down with us and asked for our comments, thoughts and ideas about where they&#8217;re at, and where we think they should be going. We met with folks from the <a href="http://microsoft.com/web/">IIS Web Platform</a> team, the <a href="http://www.microsoft.com/sqlserver/2008/en/us/default.aspx">SQL server</a> team, as well as some representatives from <a href="http://www.codeplex.com/">Codeplex</a>, <a href="http://silverlight.net/">Silverlight</a>, <a href="http://technet.microsoft.com/en-us/library/bb978526.aspx">Powershell</a>, <a href="http://www.asp.net/%28S%28waglea45zymnbmbli4vgme45%29%29/ajax/">ASP.NET Ajax</a> (which is not exclusive to ASP.NET, despite the name), and <a href="http://www.bing.com/maps/explore/">Bing maps</a>. </p>
<p>We had a chance to air grievances, which was cathartic in some ways, but I think it was more important to us to be able to sit down with the actual teams who are working on this technology at Microsoft, and really get into the specific challenges we face. The approach was not generally pitchy, and with very few exceptions, a great deal of effort was put into making all of us from the open source community feel like respected authorities in our field whose opinions really matter. </p>
<p>Something they did this year which was apparently not done last year was to include representatives from well-known PHP-based projects who are not normally parts of the PHP community. I honestly hadn&#8217;t realized that the many of the folks over Joomla, WordPress and Drupal often don&#8217;t consider themselves as part of the greater PHP community, and getting a chance to discuss that with them brought up some interesting perspectives. I don&#8217;t think the guys representing these projects were there in an official capacity, but their point of view was one that had honestly not occurred to me before, so that was a really interesting and unexpected benefit. There was some debate on whether or not these types of projects should be a more involved part of the PHP community, with good points on both sides, but I think most walked away with some ideas on how to move forward in making those lines of communication more accessible and open.</p>
<h3>My Perspective</h3>
<p>Of course the ultimate question from Microsoft was &#8220;What would it take for you to switch to Microsoft products for your clients?&#8221; My smartass remark was, of course &#8220;A fucking miracle.&#8221; But everyone in the room knew I was joking. I hope. If we weren&#8217;t willing to work with Microsoft on improving their products to work with open source better, we wouldn&#8217;t have been there. </p>
<p>As often as Microsoft has been an easy target in the past, and as much bad blood as there may have been in the past, there <em>are</em> people at Microsoft that care about working with the open source community, and who are making progress to get there. It is our job as technology professionals to fairly evaluate technology and make recommendations based on what makes the most sense technologically and financially. It is NOT our job to make religious decisions based on zealotry. </p>
<p>That means that if and when Microsoft can meet my needs and/or the needs of my clients, it can and should be part of that evaluation or I&#8217;m not doing my job. Does that mean I&#8217;m ready to switch back? No. Not yet, anyway. But I believe they are listening, and I saw some things during this summit that make me far more likely to start including some parts of Microsoft&#8217;s products into the technology I suggest as being potentially viable for client projects, which is a far cry closer than I was last week. Specifically, some of the stuff I learned about Silverlight, Bing&#8217;s geolocation products and Windows Azure (Microsoft&#8217;s cloud hosting platform) was pretty impressive. As I get to play with these products a little more, I&#8217;ll be blogging about them with my fair evaluation of pros and cons, so stay tuned.</p>
<p>I&#8217;m also excited to see where the <a href="http://www.microsoft.com/web/Downloads/platform.aspx">Microsoft Web Platform Installer product</a> heads. Right now, the WebPI product is a very easy to use, slick solution for the less techy individual who wants to, for example, deploy a WordPress blog in 5 minutes or less and may not have the savvy to do the install themselves &#8211; basically a MS version of Cpanel/Fantastico, which we have had available to us as web administrators for over a decade. That product is less interesting to me right now, but some of the directions they could go in for more advanced users like us hold real potential. We had some suggestions that were well-received, and if they are actually implemented in the way I envision them, it could honestly turn the table and make some of the Microsoft web server products something that I could consider recommending, or even using myself. (I should also mention that Cpanel is the most horrific, insecure, hack-prone web control panel I&#8217;ve ever used, and I am NOT endorsing it as a solution.)</p>
<p>The reality is that competition inspires innovation, and Microsoft getting better means progress for everyone. I saw a post on Twitter that basically implied that open source representatives attending this conference were traitors or sellouts. I don&#8217;t see it that way at all. We have amazing open source products like Firefox because the open source community worked together to create a better product, and Microsoft responded by making vast improvements to Internet Explorer, building in more security and standards compliance. <strong>When we work together to innovate, everybody wins.</strong></p>
<p>Another transition I&#8217;ve been seeing in Microsoft which was really made more obvious by this summit is that there is a less omnipresent feeling of &#8220;all or nothing&#8221; within many Microsoft departments. As open source advocates, we enjoy having choices. Previously with Microsoft, you&#8217;d get the most benefit from their products by committing to an entirely Microsoft development process (&#8220;drinking <em>all</em> of the kool-aid, since the best stuff is the sugary goop at the bottom&#8221;), with benefits sharply falling off if you opted to pick and choose. This philosophy has always been distinctly in opposition with the open source philosophy, and I believe was likely the cause for some of the distrust coming from the open source community. Seeing this transition into a paradigm of being able to cherry-pick what we like for some things and sticking with open source solutions we like better for others is a step in the right direction, in my opinion. </p>
<p>An additional unexpected benefit to sitting down with all these MS product people was that I got a chance to better understand some of the legal/licensing challenges Microsoft faces. I&#8217;m not making excuses for them, but I hadn&#8217;t considered some of the obstacles in the way of people at MS who care about working with us. Microsoft is a big target with deep pockets, and they have to cover their own asses. I was quicker to dismiss some of the corporate decisions as being &#8220;evil&#8221; prior to sitting down with some of them and understanding why they do what they do. Don&#8217;t get me wrong &#8211; some of their decisions (*cough*sudo*cough*) still don&#8217;t make sense to me and I believe they are wrong, but I think I have a better understanding of where they sit than I did before</p>
<h3>Wrapping Up</h3>
<p>Overall, I would consider this summit a great success, and I hope I get to participate again in the future. There are several people who really deserve a shout-out for all of the hard work that went into this and are directly responsible for it&#8217;s success. From the PHP community, <a href="http://blog.calevans.com/">Cal Evans</a> was a co-host and an absolute rock star, always quick to make sure things ran smoothly and kick-start conversations and redirect us back when we went off on tangents. From Microsoft, Karri Dunn, Tonya Young, Josh Holmes, Peter Laudati, Lauren Cooney, and others were amazing. I may be forgetting a few &#8211; I am still a little wiped from the week and the traveling.</p>
<p>Was this an instant fix? Certainly not. Do we all have a lot more work to do before we&#8217;re &#8220;there&#8221;? Absolutely. But as Cal Evans put it on his own blog roundup, &#8220;The more people I get to know at Microsoft, the less I’m able to despise the company.&#8221; They took the time to find out what we think, even when it may not have been what they wanted to hear. Time will tell whether or not they actually act on it. </p>
<h3>Other PHP Representatives Blog Post Roundups</h3>
<p>I&#8217;ll be updating this list as more people finish their blog post roundups, so you can get take their on the summit. Many of them are far smarter than I am, so it&#8217;s worth reading what they have to say.</p>
<ul>
<li><a href="http://blog.calevans.com/2009/12/05/mswds09/">Cal Evans</a> (<a href="http://twitter.com/CalEvans">@CalEvans</a>)</li>
<li><a href="http://blog.phpdeveloper.org/?p=246">Chris Cornutt</a> (<a href="http://twitter.com/enygma">@enygma</a>)</li>
<li><a href="http://blog.maartenballiauw.be/post/2009/12/07/Microsoft-Web-Development-Summit-2009.aspx">Maarten Balliauw</a> (<a href="http://twitter.com/maartenballiauw">@maartenballiauw</a>)</li>
<li><a href="http://www.rafaeldohms.com.br/2009/12/04/microsoft-web-developer-summit-2009-in-review/en/">Rafael Dohms</a> (<a href="http://twitter.com/rdohms">@rdohms</a>)</li>
<li><a href="http://blueparabola.com/blog/microsoft-web-developer-summit-2009">Keith Casey</a> (<a href="http://twitter.com/CaseySoftware">@CaseySoftware</a>)</li>
<li><a href="http://blog.wampserver.com/index.php/2009/12/05/microsoft-web-development-summit-2009/">Romain Bourdon</a> (in French) (<a href="http://twitter.com/le_vrai_roms">@le_vrai_roms</a>)</li>
<li><a href="http://blog.tabini.ca/2009/12/09/microsoft-is-and-microsoft-does/">Marco Tabini</a> (<a href="http://twitter.com/mtabini">@mtabini</a>)</li>
<li><a href="http://community.joomla.org/blogs/community/1088-slowing-back-down-mswds-and-jdc09-reflection.html">Sam Moffatt</a> (<a href="http://twitter.com/Pasamio">@Pasamio</a>)</li>
<li><a href="http://blog.echolibre.com/2009/12/microsoft-web-developer-summit/">Helgi Þormar Þorbjörnsson</a> (<a href="http://twitter.com/h">@h</a>)</li>
</ul>
<h3>MS Representative Blogs</h3>
<p>If you&#8217;d like to see more about the fabulous people at MS who are working hard to move the company forward in a way that works with open source, check out their blogs. I&#8217;m proud to call these guys friends, and as long as we continue to have people like this working for Microsoft, I think the lines of communication and cooperation between both sides of the aisle will keep moving forward.</p>
<ul>
<li><a href="http://www.davebost.com/blog/">Dave Bost</a> (<a href="http://twitter.com/DaveBost">@DaveBost</a>)  &#8211; Developer Evangelist</li>
<li><a href="http://www.joshholmes.com/blog/">Josh Holmes</a> (<a href="http://twitter.com/JoshHolmes">@JoshHolmes</a>) &#8211; UX Architect Evangelist</li>
<li><a href="http://blogs.iis.net/tobintitus/">Tobin Titus</a> (<a href="http://twitter.com/tobint">@tobint</a>) &#8211; MSDN Site Manager</li>
<li><a href="http://blogs.msdn.com/peterlau/">Peter Laudati</a> (<a href="http://twitter.com/jrzyshr">@jrzyshr</a>) &#8211; Developer Evangelist</li>
<li><a href="http://blogs.msdn.com/markbrown/">Mark Brown</a> (<a href="http://twitter.com/markjbrown">@MarkJBrown</a>) &#8211; Product Manager for Microsoft Web Platform</li>
<li>William Coleman (<a href="http://twitter.com/will_coleman">@will_coleman</a>) &#8211; Developer Evangelist</li>
<li>Lauren Cooney (<a href="http://twitter.com/lcooney ">@lcooney</a>) &#8211; GPM for Web Platforms at Microsoft</li>
<li>Jas Sandhu (<a href="http://twitter.com/jassand">@jassand</a>) &#8211; Interop Strategy Evangelist</li>
<li><a href="http://ruslany.net/">Ruslan Yakushev</a> (<a href="http://twitter.com/ruslany">@ruslany</a>) &#8211; Program Manager on IIS team in charge of FastCGI and PHP support</li>
<li><a href="http://hanselman.com">Scott Hanselman</a> (<a href="http://twitter.com/shanselman">@shanselman</a>)  &#8211; Principal Program Manager Lead</li>
</ul>
<p>Funnily, as I&#8217;m writing this, <em>Futurama: Into the Wild Green Yonder</em> has been on television, and the scene that just played is the one where Calculon says &#8220;I&#8217;d like to thank the academy, my agent, and most of all my operating system &#8211; Windows 7, for everything it &#8211;&#8221; at which point his OS locks up. Windows 7 is actually a great product, and I run it on my Mac using Bootcamp and VM Fusion, but I thought the timing was amusing.</p>
<p><em>Kool-aid photo taken in <a href="http://www.snipe.net/2009/02/getting-to-know-belize/">Belize</a> by me &#8211; just thought it was funny. Lead post image by <a href="http://eliw.com/">Eli White</a>.</em></p>

 <script type="text/javascript">
	<!--
		function onover(what){
	document.getElementById('blurbtext').innerHTML=''+what+'';
	}
	function onout(){
	document.getElementById('blurbtext').innerHTML='&nbsp;';
	}
	-->
	</script>



<h3 style="padding-bottom: 0px; margin-bottom: 0px;">Also check out: <br /><span id="blurbtext"><br /></span></h3>

<div id="relatedposts">




		
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2009/02/practical-mod_rewrite/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2009/02/dave.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Practical Mod_Rewrite for Web Developers" height="90" width="90" onmouseover="onover('Practical Mod_Rewrite for Web Developers')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2011/01/facebook-https-opt-in/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2011/01/Facebook-Needle.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Facebook Introduces HTTPS Opt-In for Users, Impacts App Developers" height="90" width="90" onmouseover="onover('Facebook Introduces HTTPS Opt-In for Users, Impacts App Developers')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2008/07/identify-and-fix-sql-injection-vulnerabilities-in-web-applications/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2008/07/screenshot.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Identify and Fix SQL Injection Vulnerabilities in Web Applications" height="90" width="90" onmouseover="onover('Identify and Fix SQL Injection Vulnerabilities in Web Applications')" onmouseout="onout()" /></a></div>

	</div>

]]></content:encoded>
			<wfw:commentRss>http://www.snipe.net/2009/12/mswds09/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Web 2-Point-Owned: Apple.Com&#8217;s XSS Exploit</title>
		<link>http://www.snipe.net/2009/11/apple-coms-xss-exploit/</link>
		<comments>http://www.snipe.net/2009/11/apple-coms-xss-exploit/#comments</comments>
		<pubDate>Wed, 04 Nov 2009 03:20:06 +0000</pubDate>
		<dc:creator>snipe</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[exploits]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://www.snipe.net/?p=2505</guid>
		<description><![CDATA[Earlier today, we got a glimpse of what happens when a big company forgets to cross their t&#8217;s and dot their i&#8217;s. And in programming, that means failing to validate user-entered data before displaying it on-screen. My friend Peter Bukowinski first brought the exploit to my attention, posting a link to Apple.Com&#8217;s iTunes affiliate search [...]]]></description>
			<content:encoded><![CDATA[<p>Earlier today, we got a glimpse of what happens when a big company forgets to cross their t&#8217;s and dot their i&#8217;s. And in programming, that means failing to validate user-entered data before displaying it on-screen.</p>
<p><span id="more-2505"></span></p>
<p>My friend <a href="http://twitter.com/pmbuko" target="_blank">Peter Bukowinski</a> first brought the exploit to my attention, posting a link to Apple.Com&#8217;s iTunes affiliate search interface. The link he sent me led to a page that looked like this:</p>
<p><a href="http://www.snipe.net/wp-content/uploads/2009/11/Screen-shot-2009-11-03-at-5.13.10-PM.png"><img class="aligncenter size-large wp-image-2506" title="Screen shot 2009-11-03 at 5.13.10 PM" src="http://www.snipe.net/wp-content/uploads/2009/11/Screen-shot-2009-11-03-at-5.13.10-PM-560x426.png" alt="Screen shot 2009-11-03 at 5.13.10 PM" width="560" height="426" /></a></p>
<p>Notice that the url in the browser bar is actually apple.com &#8211; this was not a parody site.</p>
<p>Evidently, Apple&#8217;s developers had neglected to validate the data being sent through the query string. The actual url was:</p>
<p><em>http://www.apple.com/itunes/affiliates/download/?artistName=your+mom&amp;thumbnailUrl=http://www.moneysavingmom.com/money_saving_mom/images/2008/09/02/joblogo.gif&amp;itmsUrl=http://www.bjs.com/&amp;albumName=a+better+blowjob</em></p>
<p>So by editing the variables passed through the url, you could have a little harmless fun at Apple&#8217;s expense:</p>
<p><a href="http://www.snipe.net/wp-content/uploads/2009/11/Screen-shot-2009-11-03-at-5.24.38-PM.png"><img class="aligncenter size-large wp-image-2508" title="Screen shot 2009-11-03 at 5.24.38 PM" src="http://www.snipe.net/wp-content/uploads/2009/11/Screen-shot-2009-11-03-at-5.24.38-PM-560x426.png" alt="Screen shot 2009-11-03 at 5.24.38 PM" width="560" height="426" /></a></p>
<p>As you can see, by editing the query string and changing the variables for artistName, thumbnailUrl and itmsUrl, we could make the page hosted on Apple.Com&#8217;s server display whatever mischief we want. The variables were being echoed out directly on the page without any validation, filling in the blanks in their iTunes affiliate page template: [image] Looking for [blank] by [blank]?</p>
<h2>But What is XSS?</h2>
<p>Honestly, if you&#8217;re a web developer and you don&#8217;t know what XSS is by now, you suck at your job and should probably go back to spanking it to porn in your mom&#8217;s basement and leave the coding to the grownups. It&#8217;s been around long enough that you forfeit your right to call yourself a web-anything if you don&#8217;t know what it is by now. That said&#8230;</p>
<p>From the <a href="http://www.cgisecurity.com/xss-faq.html" target="_blank">Cross-Site Scripting FAQ on cgisecurity.com</a>:</p>
<blockquote><p>Cross site scripting (also known as XSS) occurs when a web application gathers malicious data from a user. The data is usually gathered in the form of a hyperlink which contains malicious content within it. The user will most likely click on this link from another website, instant message, or simply just reading a web board or email message. Usually the attacker will encode the malicious portion of the link to the site in HEX (or other encoding methods) so the request is less suspicious looking to the user when clicked on. After the data is collected by the web application, it creates an output page for the user containing the malicious data that was originally sent to it, but in a manner to make it appear as valid content from the website. Many popular guestbook and forum programs allow users to submit posts with html and javascript embedded in them. If for example I was logged in as &#8220;john&#8221; and read a message by &#8220;joe&#8221; that contained malicious javascript in it, then it may be possible for &#8220;joe&#8221; to hijack my session just by reading his bulletin board post.</p></blockquote>
<p><strong>Cross-Site Scripting is nothing new, not even on large, popular websites.</strong> While this example on Apple.Com resulted only in a humorous page being available under a large company&#8217;s domain, many XSS attacks can be far more sinister &#8211; and the attack had far more potential than our harmless prank, as users on Reddit.Com noticed that the exploit <a href="http://www.reddit.com/r/programming/comments/a0n3q/apple_xss_exploit/" target="_blank">did allow malicious scripting  including JavaScript injection and IFrame injection</a> (thanks to <a href="http://twitter.com/shocm">@shocm</a> for bringing the Reddit thread to my attention).</p>
<p>It looks as though Apple&#8217;s server sanitized the &lt;script&gt;&lt;/script&gt; tag, but there are at least a half-dozen ways to inject javascript without using a &lt;script&gt; tag, many of which are outlined on the <a href="http://ha.ckers.org/xss.html" target="_blank">XSS Cheat Sheet</a>.</p>
<p>This type of exploit is a <a href="http://en.wikipedia.org/wiki/Cross-site_scripting#Traditional_versus_DOM-based_vulnerabilities" target="_blank">DOM-based exploit</a>. Wikipedia does a good job of summing it up:</p>
<blockquote><p>Traditionally, cross-site scripting vulnerabilities would occur in server-side code responsible for preparing the HTML response to be served to the user. With the advent of web 2.0 applications, a new class of XSS flaws emerged, however: DOM-based vulnerabilities come to be during the content processing stages delegated to the client, typically in client-side JavaScript. The name refers to the standard model for representing HTML or XML contents, called the Document Object Model or DOM for short. The model is the primary way for JavaScript programs to manipulate the state of a web page, and populate it with dynamically computed data.</p>
<p>A typical example is a piece of JavaScript accessing and extracting data from the URL via the location.* DOM, or receiving raw non-HTML data from the server via XMLHttpRequest, and then using this information to write dynamic HTML without proper escaping, entirely on client side.</p></blockquote>
<p>Netcraft featured an <strong><a href="http://news.netcraft.com/archives/2008/05/16/paypal_xss_vulnerability_undermines_ev_ssl_security.html" target="_blank">XSS vulnerability on PayPal&#8217;s website</a> </strong>discoverd by a Finnish security researcher in May 2008:</p>
<p><a href="http://www.snipe.net/wp-content/uploads/2009/11/paypal-xss-ev-ssl-certificate-resized.png"><img class="aligncenter size-full wp-image-2511" title="paypal-xss-ev-ssl-certificate-resized" src="http://www.snipe.net/wp-content/uploads/2009/11/paypal-xss-ev-ssl-certificate-resized.png" alt="paypal-xss-ev-ssl-certificate-resized" width="500" height="318" /></a></p>
<p>An exploit was reported in March 2007 on YouTube&#8217;s website, allowing a similar type of JavaScript attack:</p>
<p><a href="http://www.snipe.net/wp-content/uploads/2009/11/youtube-xss-cordobo.png"><img class="aligncenter size-full wp-image-2512" title="youtube-xss-cordobo" src="http://www.snipe.net/wp-content/uploads/2009/11/youtube-xss-cordobo.png" alt="youtube-xss-cordobo" width="367" height="247" /></a></p>
<p>And an <strong><a href="http://www.youtube.com/watch?v=Ui0MOD9dYok" target="_blank">XSS exploit of eBay was documented in this YouTube video</a></strong>, also in 2007, and Twitter has suffered several XSS exploit attacks as recently as this year. But those are just a small handful of examples from a really long list.</p>
<p>In fact, <strong>just today, an article came out in The Register, detailing an <a href="http://www.theregister.co.uk/2009/11/04/website_cookie_stealing/" target="_blank">XSS cookie hijacking attack</a> that affects many large websites, including Google and Facebook. </strong>From the article:</p>
<blockquote><p>A security researcher has discovered a weakness in a core browser protocol that compromises the security of Google, Facebook, and other websites by allowing an attacker to tamper with the cookies they set.</p>
<p>The weakness stems from RFC 2965, which dictates that browsers must allow subdomains (think www.google.com) to set and read cookies for their parent (google.com). The specification also states that if a cookie for a subdomain doesn&#8217;t already exist, the browser should use the cookie belonging to the parent instead.</p>
<p>The arrangement makes it possible for attackers to steal or even alter the cookies that websites use to authenticate their users. Attackers would first have to identify an XSS, or cross-site scripting, bug in some part of the site they are targeting. But because virtually any subdomain will suffice, the scenario isn&#8217;t unrealistic, two web security experts said.</p></blockquote>
<p>Apple&#8217;s development team responded quickly to the exploit on their site &#8211; a little too quickly in my opinion, since I was preparing to have a little more fun with it, but they had patched it by the time I got home. It should still serve as a reminder to developers of just how important data scrubbing and validation is, no matter whether your site is big or small, with 2 hits a day or 2 million.</p>
<h2>XSS Vulnerabilities Compromise User Data &#8211; And Your Reputation</h2>
<p><strong>As the eBay exploit video shows (and as anyone on Twitter saw this year), XSS attacks are not just embarrassing &#8211; they can be used for phishing scams, tricking users to login to a fake site, exposing their login credentials or worse. </strong>PayPal and bank phishing schemes often prompt the user to &#8220;confirm&#8221; their bank account information or credit card information &#8220;for security purposes&#8221;.</p>
<p>Other XSS exploits may trick users into thinking their computer has been infected by a virus, prompting them to download &#8220;free software&#8221; to clean their system &#8211; meanwhile the software the panicking user is downloading actually is the virus. And even though you might never fall for something so blatantly obviously, lots and lots of people do, every day.</p>
<p>Often attackers will inject JavaScript, VBScript, ActiveX, HTML, or Flash into a vulnerable application to fool a user in order to gather data from them. Everything from <strong>account hijacking</strong>, <strong>changing user settings</strong>, <strong>cookie theft/poisoning</strong>, or false advertising is possible. <strong>New malicious uses are being found every day for XSS attacks. </strong>XSS exploits can even be used to facilitate &#8220;Denial Of Service&#8221; attacks (or DoS attacks), and potential &#8220;auto-attacking&#8221; of hosts if a user simply reads a post on an infected message board.</p>
<p>While XSS attacks themselves cannot compromise files on your server, XSS holes can allow Javascript insertion, which may allow for limited execution. If an attacker were to exploit a browser flaw (browser hole) it could then be possible to execute commands on the client&#8217;s side. If command execution were possible it would only be possible on the client side. In simple terms <strong>XSS holes can be used to help exploit other holes that may exist in your browser or server</strong>.</p>
<h2>User-Submitted Data and Your Database</h2>
<p>Trusting user variables without cleaning or validating them opens you up to a whole host of problems if your application is powered by a database.</p>
<p>For example, the following SQL command is used to validate user login requests:</p>
<p>[sourcecode language="sql"]$sql_query = &#8220;select * from users where user=&#8217;$user&#8217; and password=&#8217;$pass&#8217;&#8221;[/sourcecode]</p>
<p>If the user-submitted data is not properly validated, an attacker can exploit this query and pass the login screen by simply submitting specially crafted variables.</p>
<p>For example, attacker can submit the following data as a $user variable: admin&#8217; or &#8217;1&#8242;=&#8217;1 . When this $user variable is glued together with the query, it will look as followed:</p>
<p>[sourcecode language="sql"]$sql_query = &#8220;select * from users where user=&#8217;admin&#8217; or &#8217;1&#8242;=&#8217;1&#8242; and password=&#8217;$pass&#8217;&#8221;[/sourcecode]</p>
<p>Now, the attacker can safely pass the login screen because or &#8217;1&#8242;=&#8217;1&#8242; causes the query to always return a &#8220;true&#8221; value while ignoring the password value.</p>
<p>Using similar techniques, an attacker can <strong>retrieve database records</strong>, <strong>pass login screens</strong>, and <strong>change database contents</strong>, for example by <strong>creating new administrative users</strong>. Using similar techniques, a malicious attack will be able to execute arbitrary shell commands, read or write arbitrary commands, and more.</p>
<p><strong>It is our responsibility to protect our users (and the trust they put in us, deserved or not)</strong>, and XSS vulnerabilities open the doors to all manner of mischief. At their most benign, they can result in a site defacement. At their worst, they compromise the very safety and livelihood of the people that fall for them &#8211; not to mention the impact on your company&#8217;s reputation.</p>
<p><strong>If you think your site is too small for hackers to bother with, think again.</strong> There are plenty of script kiddies out there that will happily run their exploit toolkit scripts and crawl page after page, testing for exploits. They are able to find common exploits in sites they have never physically even visited through this method.  And once they find a vulnerability, word spreads fast.</p>
<p><strong>It should also serve as a reminder to us as a internet users to be a little less trusting.</strong> It seems obvious, but we are so trained to respond to visual cues and prompts for activities we do every day &#8211; logging into a website, checking out with PayPal, etc &#8211; that we can sometimes become careless. We sometimes trust the big guys a little too much, assuming that because they&#8217;re that big, they&#8217;ve got to have their shit together. Even when we know better, our interactions online have become somewhat mechanical.</p>
<p>While browsers are getting better at helping us realize if we&#8217;re entering data into a site that is suspect, ultimately the responsibility falls back upon us to pay attention to what we&#8217;re doing and to whom we give our valuable information.</p>
<h2>So as a developer, what can you do to protect your software and sites from XSS attacks?</h2>
<p>Here are a few good places to start.</p>
<h3>Stuff to Read:</h3>
<ul>
<li><strong>Learn more about XSS and how it works</strong> on the <a href="http://www.cgisecurity.com/xss-faq.html" target="_blank">Cross-Site Scripting FAQ</a> on cgisecurity.com.</li>
<li><strong>Learn more about <a href="http://www.greensql.net/publications/backdoor-webserver-using-mysql-sql-injection" target="_blank">Backdooring a Webserver using MySQL</a></strong>, which details how a user could read/write files to your server and execute commands using mySQL.</li>
<li><strong>Check out the <a href="http://www.owasp.org/index.php/Main_Page" target="_blank">OWASP (Open Web Application Security) website</a></strong> and stay up to date</li>
</ul>
<h3>Stuff to Do: <strong></strong></h3>
<p><strong>Always clean and validate ANY data you receive from the user</strong></p>
<p>Use the <strong>appropriate escaping for the programming languages and databases you use</strong></p>
<p><strong>Educate yourself on as many examples of XSS (both theoretical and in-the-wild) as you can</strong>, so you know what to look for. Wikipedia details a few common methods worth checking out on their <a href="http://en.wikipedia.org/wiki/Cross-site_scripting">Cross-Site Scripting page</a>. The only real defense you have against attacks is to keep yourself informed and current on what the bad guys are up to. This isn&#8217;t one of those things that you can read about once and rest on your laurels. You must be vigilant and aggressive about staying on top of what&#8217;s going on. It&#8217;s your job.</p>
<p><strong>Bookmark and test your scripts against the <a href="http://ha.ckers.org/xss.html" target="_blank">code samples on the XSS Cheatsheet</a></strong> on ha.ckers.org. This cheatsheet is specifically geared towards exploits that can potentially get past standard filtering that developers might do on their data, such as strip_tags. Also check out the <a href="http://www.justinshattuck.com/2007/01/18/mysql-injection-cheat-sheet/">MySQL Injection Cheat Sheet </a>and the <a href="http://ferruh.mavituna.com/sql-injection-cheatsheet-oku/" target="_blank">SQL Injection Cheat Sheet</a>.</p>
<p><strong>P</strong><strong>eriodically check your webserver access logs and error logs</strong> and look for anything that looks like someone might be trying to find a backdoor. Look for people trying to pass data that doesn&#8217;t belong, sending variables that are common configuration file names, and so on.</p>
<p><strong>T</strong><strong>urn OFF error reporting displayed to the browser on production environments</strong>, and instead log errors to a file. Error messages can expose information about your file structure and your database structure.</p>
<p><strong>Pay attention!</strong> Keep your ear to the ground on sites like <a href="http://ha.ckers.org/" target="_blank">ha.ckers.org</a> and other (mostly) whitehat exploit blogs and communities. This is your livelihood. Do your job.</p>
<p><strong>If you&#8217;re using open source software, make sure you keep up to date with new releases. </strong>Many popular open source projects (such as WordPress, phpNuke, phpBB, etc) are frequent targets for malicious scripting. Be sure to hide references to your software version numbers from the public, since certain versions may have exploits that are well known, and attackers will know exactly how to target your site if they know what version you&#8217;re running.</p>
<p><strong>Shell out the $39 for the 300 page e-Book <em><a href="http://www.detectmalice.com/" target="_blank">Detecting Malice</a></em>, written by Robert Hansen</strong> (aka RSnake, on Twitter at <a href="http://twitter.com/RSnake">@RSnake</a>) <strong>and actually read it</strong>. I can&#8217;t believe I&#8217;m actually endorsing a freaking e-Book, but its really that good. I don&#8217;t know Robert personally, I&#8217;m not endorsing it as a favor or because I like him as a person. For all I know he eats puppies for breakfast. But his book is fantastic.</p>
<p>And finally, Test test test test test!</p>
<p>There&#8217;s even an <a href="http://twitter.com/xssexploits" target="_blank">interesting Twitter account that highlights high-profile XSS exploits</a> &#8211; it&#8217;s low-volume, but it&#8217;s surprising how many turn up that never make the news.</p>
<p>Incidentally, something I discovered while having a little fun on Apple.Com&#8217;s site &#8211; <strong>if you do a <a href="http://images.google.com/images?hl=en&amp;safe=off&amp;q=%22hot%20tar%20enema%22&amp;um=1&amp;ie=UTF-8&amp;sa=N&amp;tab=wi" target="_blank">Google Images search for &#8216;hot tar enema&#8221;</a>, only four images come up, and one of them is a photo of Rush Limbaugh</strong>. I&#8217;m not even making that up. Also funny, since I tweeted about that this afternoon, <a href="http://www.google.com/search?hl=en&amp;safe=off&amp;q=%22hot+tar+enema%22&amp;aq=f&amp;oq=&amp;aqi=" target="_blank">my tweet is now the number one Google search result for &#8220;hot tar enema&#8221;</a>. Aren&#8217;t you jealous?</p>

 <script type="text/javascript">
	<!--
		function onover(what){
	document.getElementById('blurbtext').innerHTML=''+what+'';
	}
	function onout(){
	document.getElementById('blurbtext').innerHTML='&nbsp;';
	}
	-->
	</script>



<h3 style="padding-bottom: 0px; margin-bottom: 0px;">Also check out: <br /><span id="blurbtext"><br /></span></h3>

<div id="relatedposts">




		
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2008/07/what-exactly-is-the-point-of-twitter/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2008/06/twitter21.png&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="What Exactly is the Point of Twitter?" height="90" width="90" onmouseover="onover('What Exactly is the Point of Twitter?')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2010/10/firefox-addons-xss-testing/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2010/10/beach-xss.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Firefox Addons for Penetration/XSS Testing" height="90" width="90" onmouseover="onover('Firefox Addons for Penetration/XSS Testing')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2006/06/checkboxesmultiple-select-boxes-in-php/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2008/06/drupal-taxonomy-as-checkboxes.png&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Checkboxes/Multiple Select Boxes in PHP" height="90" width="90" onmouseover="onover('Checkboxes/Multiple Select Boxes in PHP')" onmouseout="onout()" /></a></div>

	</div>

]]></content:encoded>
			<wfw:commentRss>http://www.snipe.net/2009/11/apple-coms-xss-exploit/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Big Changes to the Facebook Platform</title>
		<link>http://www.snipe.net/2009/10/upcoming-changes-to-the-facebook-application-platform/</link>
		<comments>http://www.snipe.net/2009/10/upcoming-changes-to-the-facebook-application-platform/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 18:00:22 +0000</pubDate>
		<dc:creator>snipe</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook application development]]></category>
		<category><![CDATA[facebook applications]]></category>
		<category><![CDATA[fbml]]></category>
		<category><![CDATA[social networks]]></category>

		<guid isPermaLink="false">http://www.snipe.net/?p=2472</guid>
		<description><![CDATA[Last night, during a webcast, Facebook announced some upcoming significant changes to the Facebook platform. Most are good, a few may be frustrating, but here they are. These changes will start to be rolled out in November &#38; December and will continue into the first and second quarter of 2010. If you develop Facebook applications, [...]]]></description>
			<content:encoded><![CDATA[<p>Last night, during a webcast, Facebook announced some upcoming significant changes to the Facebook platform. Most are good, a few may be frustrating, but here they are. These changes will start to be rolled out in November &amp; December and will continue into the first and second quarter of 2010.</p>
<p><span id="more-2472"></span></p>
<p>If you develop Facebook applications, I <em>strongly</em> encourage you to check out their <strong>new <a href="http://wiki.developers.facebook.com/index.php/Developer_Roadmap">Facebook Developer Roadmap</a></strong>, which breaks down upcoming changes in detail and let&#8217;s you know when to expect these changes to roll out.</p>
<p>I for one am <em>thrilled</em> to see Facebook finally trying to work <em>with</em> developers to give them a clear idea of what to expect and when. As someone who has spent the past two years writing Facebook applications and being frustrated by surprise platform changes, this is a giant step in the right direction from my point of view. Previously, it was not uncommon to get only a day or two&#8217;s notice &#8211; or no notice at all &#8211; regarding critical application functionality. If you&#8217;re the developer for one application, that&#8217;s inconvenient and annoying at best, if you&#8217;re obligated to maintain a dozen or so applications it can be utterly traumatizing.</p>
<p>From the look of things, Facebook is trying to streamline the way applications communicate with users, and is adding some features specifically designed to improve the flow of turn-based gaming and make it easier for users to find games amid the sea of applications in the app directory.</p>
<p>Overall, these changes bring new features to the application developer&#8217;s toolbelt, but changes to the newsfeed and Stream API also mean that several of the ways you were previously able to send messages to a user&#8217;s newsfeed/stream (the one you <a href="http://www.snipe.net/2009/04/changes-to-facebooks-newsfeed/">just updated in April</a> to comply with their last round of newsfeed changes) will no longer be supported.</p>
<p>To put a finer point on it, if you don&#8217;t feel like extending your current applications to take advantage of the new features, you will still need to update them to get them to function as they currently do.<strong> If you do not update your application to use the Stream API, your application will NO LONGER send any messages to your users&#8217; stream.</strong> More on this down below.</p>
<p>So here&#8217;s a quick run-down of what to expect in the next few months &#8211; I&#8217;m covering the issues that will affect current applications first, and then we&#8217;ll get into the good stuff that talks about new features and functionality, so you know what you have to update to keep your existing functionality before worrying about extending it.</p>
<h3>Big changes to the Stream, old API not supported, templates disappear, new format</h3>
<p>As I mentioned above, if you don&#8217;t care enough (or your clients are not paying you enough) to update your current applications with the new functionality these updates bring, you&#8217;re still going to have to spend some time in the code just to get them not to break.</p>
<p>As of December 20, 2009, when Facebook.showFeedDialog and feed templates are discontinued, <strong>if your application hasn&#8217;t been updated </strong>to use <a href="http://wiki.developers.facebook.com/index.php/Stream.publish">Stream.publish</a>, <a href="http://wiki.developers.facebook.com/index.php/Facebook.streamPublish">Facebook.streamPublish</a>, or <a href="http://wiki.developers.facebook.com/index.php/FB.Connect.streamPublish">FB.Connect.streamPublish</a>, <strong>your application will no longer be able to send newsfeed messages</strong>.</p>
<p>These <a href="http://wiki.developers.facebook.com/index.php/Using_the_Open_Stream_API">Stream API functions</a> will be the only way to send messages to users&#8217; streams and they are available right now, so I encourage you to start making the switch now so you have plenty of time to test and troubleshoot any issues that come up.</p>
<p>But wait &#8211; there&#8217;s more!</p>
<p><strong>Stream stories will be rendered slightly differently, with only one image and few lines of text.</strong> Only the first image and first few lines of text will be rendered by default. A user can choose to expose the rest of the images and text by clicking a &#8220;See More&#8221; link.</p>
<p><strong>Only one action link will be rendered, and it must be 25 characters long or less.</strong> &#8220;Formatting&#8221;-style characters (like &#8220;|&#8221;, &#8220;[", "]&#8220;, and others) will not be rendered.</p>
<p><a href="http://wiki.developers.facebook.com/index.php/Roadmap_Stream"><img class="aligncenter size-full wp-image-2492" title="Roadmap_Stream" src="http://www.snipe.net/wp-content/uploads/2009/10/Roadmap_Stream.jpg" alt="Roadmap_Stream" width="526" height="399" /></a></p>
<p><strong>Key Policy Change:</strong> In order to encourage intentional behavior, <strong>you will no longer be able to automatically pop up a Feed form for a user</strong> unless that user has explicitly indicated that he or she wishes to share this information. According to Facebook, &#8220;a user should never be surprised by a Feed form&#8221;. You can continue to render Feed forms through FB.Connect.streamPublish and Facebook.streamPublish.</p>
<p>In the Stream Roadmap page, they outline when it is appropriate to open a feed form:</p>
<ul>
<li>When the user has clicked a button that says &#8220;Share this&#8221;.</li>
<li>When a user has indicated via your user interface that they want to share. For example, if a user wrote a review within your application, and they checked a box that said &#8220;Share with friends&#8221; next to your &#8220;Publish this review&#8221; button. If you pre-checked a &#8220;Share with friends&#8221; box and they unchecked it, a Feed form should not pop up.</li>
</ul>
<p>Perhaps more importantly, <strong>they also outline when you should NOT prompt the user with a feed form</strong> (and therefore NOT allow your user to post the action to their stream):</p>
<ul>
<li>When a user takes an action that is a normal part of using your application, for example, achieving a new high score.</li>
<li>When you present a user with a result or new information, for example, completing a quiz.</li>
</ul>
<p>These last two will directly impact how a LOT of Facebook apps and games currently function. While it will no doubt have an adverse impact on monthly active users for the applications that currently trigger stream entries on these actions, it is most likely a response of Facebook users complaining about the tremendous influx of stupid quizzes that have been flooding their newsfeeds for the past several months.</p>
<p>Hopefully, the other changes detailed below will offset the impact of apps not appearing in the stream as often and will more than compensate for any loss in virality.</p>
<p>Check out the <strong><a href="http://wiki.developers.facebook.com/index.php/Roadmap_Stream">Stream Roadmap page on the Facebook Developers site</a></strong> for full details.</p>
<h3>No more Profile boxes or Boxes tab</h3>
<p>That&#8217;s right. Poof. Going forward (in the short term) <strong>application tabs will be the only way applications can integrate into Profiles</strong>. We will be removing profile boxes, application info sections, and the Boxes tab. Facebook says they are exploring additional ways to enable developers to integrate into Profiles.</p>
<p>Please note that it does NOT appear that Facebook will be moving application content currently in Profile boxes or the Boxes tab into Profile tabs for you. From the <a href="http://wiki.developers.facebook.com/index.php/Roadmap_Profile">Profile Roadmap page on the Facebook Developer&#8217;s Wiki</a>:</p>
<blockquote><p><strong>Where will users&#8217; profile boxes go?</strong><br />
Profile boxes will not exist in the near future. Application tabs will be the only way developers can integrate into the profile. If integrations on the profile are an important part of your application, we encourage you to focus development and transition to application tabs.</p></blockquote>
<p>(Timing: Late 2009/Early 2010)</p>
<p>So it looks like if you don&#8217;t make this change to your application yourself and you rely on Profile boxes or Boxes tab boxes for your application to work, your app will effectively just disappear from user profiles when this change goes live.</p>
<p><strong>Application tabs will shrink from 760 pixels wide (today) to <del datetime="2009-12-16T18:39:55+00:00">510 pixels</del> 520 pixels wide to accommodate a slightly revised design.</strong> Boxes, info sections, and the Boxes tab will be removed in the near future. This kind of sucks, in my opinion, but I assume they&#8217;re doing it to accommodate a new design with either larger ads or some sort of right-rail navigation. Still, that&#8217;s a <del datetime="2009-12-16T18:39:55+00:00">250</del> 240 pixel loss of real estate. Bummer.</p>
<p>Update as of Dec 15, 2009: According to a <a href="http://wiki.developers.facebook.com/index.php/Roadmap_Profile">recently updated roadmap page</a>, they will be shrinking the tabs down to 520 instead of 510. This, along with other profile changes, is set to roll out early 2010 by their last estimate.</p>
<p><strong>Slight Application Canvas page layout change. </strong>In order to make it clearer to users when they are using an application created by a third party developer, Facebook is going to slightly modify how the top-navigation is rendered on canvas pages:</p>
<p><a href="http://wiki.developers.facebook.com/index.php/Roadmap_Canvas"><img class="aligncenter size-large wp-image-2496" title="Roadmap_Canvas" src="http://www.snipe.net/wp-content/uploads/2009/10/Roadmap_Canvas-559x341.png" alt="Roadmap_Canvas" width="559" height="341" /></a></p>
<p>Looks like they&#8217;re still tinkering with ideas on the new layout of Application Canvas pages, but overall this shouldn&#8217;t impact most applications too much. They encourage developers to <a href="http://wiki.developers.facebook.com/index.php/Roadmap_Canvas">periodically check the Canvas Roadmap page for updated designs</a>.</p>
<p>Now then &#8211; we&#8217;ve covered all of the stuff that impacts your current applications as they are now. Let&#8217;s look ahead to some of the great new functionality ahead.</p>
<h3>Email</h3>
<p>Developers will be able to ask users to share their primary email addresses. This is a big deal because it was previously verboten to collect a user&#8217;s email address without specifically asking them to type it into a form and submit it. (Timing: Nov 2009)</p>
<h3>New Application Counter (woot!)</h3>
<p><a href="http://wiki.developers.facebook.com/index.php/Roadmap_Counter"><img class="alignright size-full wp-image-2477" title="Roadmap_Counter" src="http://www.snipe.net/wp-content/uploads/2009/10/Roadmap_Counter.jpg" alt="Roadmap_Counter" width="256" height="324" /></a>The <strong><a href="http://wiki.developers.facebook.com/index.php/Roadmap_Counter">application counter</a></strong> is one of my favorite improvements laid out in this roadmap and is just one of many steps Facebook is taking to position itself as a gaming platform.</p>
<p>You will have the opportunity to increment your count to indicate to a user that they should take an action in your application, for example, take their turn in a game, or see a comment from another user on content they created within that application.</p>
<p>The count can be incremented by your application, and when a user clicks through to the application, the count will be reset to zero.</p>
<p>As we continue to see an influx applications leveraging Facebook as a platform for RPG and turn-based gaming, it seems Facebook is getting behind the idea and beginning to provide specific features to encourage growth in this area. (Timing: November/December 2009)</p>
<h3>Games/Applications Dashboards</h3>
<p>In fact, apps that are games will be separated by category from apps that are&#8230; well, applications. Plus, users have access to <strong><a href="http://wiki.developers.facebook.com/index.php/Roadmap_Dashboards">two different Dashboards</a></strong>, one for Games and one for Applications.</p>
<p>The Games dashboard will have a number of features that encourage users to find games their friends and playing, and to stay active in games they&#8217;ve started, including:</p>
<p><strong>Recent games:</strong> Facebook will prominently display games that a user has recently played, showing the application icon and application name. Clicking on a game will take the user to the game&#8217;s canvas page.</p>
<p><strong>Game News: </strong>There will be a text field next to each game on the dashboard where developers can set Game News. This area is free form and targetable by user, e.g. &#8220;You are ranked 17th among your friends. Austin&#8217;s score is the next highest at 28,400. Can you beat him?&#8221; or, &#8220;Your pumpkins are wilting &#8211; water them soon!&#8221;</p>
<p><strong>Your friends are playing:</strong> Facebook will display some of the games that your friends are playing along with information about relevant activities in the game.</p>
<p><a href="http://www.snipe.net/wp-content/uploads/2009/10/Roadmap_Games_Dashboard.png"><img class="aligncenter size-large wp-image-2482" title="Roadmap_Games_Dashboard" src="http://www.snipe.net/wp-content/uploads/2009/10/Roadmap_Games_Dashboard-560x327.png" alt="Roadmap_Games_Dashboard" width="560" height="327" /></a></p>
<p>According to Facebook, an app cannot appear in both the Games directory and the Applications directory, and they&#8217;ll be reviewing Games listed in the Games directory to make sure they belong there.</p>
<p>All non-game applications will have similar functionality (your recent applications, application news messages, and applications your friends are using) in the Application Dashboard.</p>
<h3>Application Notifications</h3>
<p><strong>Facebook is removing application-to-user notifications and user-to-user notifications</strong>. Instead, they encourage you to use other channels to communicate directly with your users, and to enable them to communicate with each other about your application.</p>
<p><strong>Communication between you and your users:</strong></p>
<p>They encourage you to use Email (once the user has opted to share their email address with you) for things like product announcements, newsletters, or billing and transactional communication.</p>
<p>If you want to notify users about an action they should take with your application (like taking their turn in a game), incrementing the Application Counter will be a good way to notify them.</p>
<p>The application news in the Application Dashboard will be a great way to share a brief message with a user while they&#8217;re exploring the Dashboards. You&#8217;ll be able to target these on a per-user basis.</p>
<p><strong>Communication between your users and their friends:</strong></p>
<p>The stream is the most powerful way to enable users to share their experiences with all of their friends.</p>
<p>The new Share flow will give your users the ability to send messages directly to their friends&#8217; Inboxes, with attachments predetermined by you. This will be the best way to encourage one-to-one and one-to-few messages between users, and is intended to replace requests.</p>
<p>Users will still be able to invite their friends to check out your application.</p>
<p>The estimated timing on this is approximately 30 days after you are able to start requesting a user&#8217;s email address. (Latest estimate: November/December 2009)</p>
<h3>Open Graph API: Incredible potential, or not at all?</h3>
<p>The info on Facebook&#8217;s Developer page for this is a little vague at best. They state:</p>
<blockquote><p>The Open Graph API will allow any page on the Web to have all the features of a Facebook Page. Once implemented, developers can include a number of Facebook Widgets, like the Fan Box, or leverage any API, which enable the transformation of any Web page so it functions similar to a Facebook Page.</p>
<p>For example, AwesomeTees might decide that strategically they would like to locate their brand identity at www.awesometees.com. AwesomeTees will install the Fan Box widget, which will allow any Facebook user to &#8220;Become a Fan&#8221; of AwesomeTees, thereby establishing an official connection to AwesomeTees. The user will then have AwesomeTees listed in their list of connections on their profile as Pages are represented today.</p></blockquote>
<p>This isn&#8217;t that different than how it currently works, so that&#8217;s not really news. What is interesting is this one line n their description, further down:</p>
<blockquote><p>Additionally, any content that AwesomeTees publishes on AwesomeTees.com will show up in the stream on Facebook like it normally would.</p></blockquote>
<p>Wait, say what? It sounds like they&#8217;re saying that news updates that would normally appear on a website, and would have to be manually cross-posted to a brand&#8217;s Facebook fan page will somehow automagically appear. I would have to assume they will require some sort of XML or JSON standardized format that website news announcements will have to be published in, but there&#8217;s little detail out on this just yet. This feature is a ways off though, with initial versions not expected until the second quarter of 2010.</p>
<h3>And finally &#8211; Verification goes away as a brand, becomes universal for all apps</h3>
<p>According to the <a href="http://wiki.developers.facebook.com/index.php/Roadmap_Principles_Policies_and_Verification">Principles, Policies and Verification roadmap</a>, Facebook is doing away with paid Verification and is extending it out to all applications.</p>
<blockquote><p>On December 1st, 2009 we&#8217;ll retire the Verification brand, as we scale what was a voluntary program into a universal requirement. There is no longer a submission process or fee, and there won&#8217;t be distribution boosts as the product will move towards more intentional user sharing. Starting today, we will suspend the processing of Verification submissions. <strong>All apps must meet Verification Checklist expectations and will be subject to review at any time.</strong></p></blockquote>
<p>So this means while you no longer have to shell out big bucks for your app to be verified, it also means that Facebook will probably be more aggressive about making sure all developer applications do meet their verification criteria, and will yank your app with ir without notice if it feels like your app isn&#8217;t up to snuff.</p>
<h3>Full Timeline</h3>
<p>To give you a little more perspective, here is the timeline of the upcoming Platform changes, based on Facebook’s Developer Roadmap and originally compiled by <a href="http://www.insidefacebook.com/2009/10/29/mark-your-calendars-planning-for-facebooks-platform-changes-over-the-next-3-6-months/">InsideFacebook.Com</a>:</p>
<p><strong>Late October 2009</strong></p>
<ul>
<li>Simplified policies posted, verification program ended, and “extending verification standards to all applications”</li>
<li> Platform Live Status tool launching, which will show “updates on platform stability and load”</li>
</ul>
<p><strong>November 2009</strong></p>
<ul>
<li> New email permission API (developers can ask users to share their email address)</li>
<li> Access point to invites will be moved “to either a filter in Inbox or surfaced in the Application and Games Dashboards”</li>
<li>User-to-user Inbox APIs will be launched</li>
<li>Stream story formatting changes (1 image shown by default, few lines of text, 1 action link)</li>
<li>New “add bookmark” button</li>
</ul>
<p><strong>November/December 2009</strong></p>
<ul>
<li>Notifications API (both app-to-user and user-to-user) will be removed (note: Facebook says this will happen “30 days after email permission is available”)</li>
<li>Feed forms cannot be popped open without “explicit user intent” (note: this is a new Facebook policy)</li>
<li>Application bookmarks moving from the bottom menu bar to the left side of the home page</li>
<li>Counter API launching (counts can appear on home page application bookmarks)</li>
<li>Applications and Games dashboards launching</li>
<li>New application branding on canvas pages launching</li>
</ul>
<p><strong>December 2009</strong></p>
<ul>
<li> All stream publishing APIs beside Stream.publish, Facebook.streamPublish, and FB.Connect.streamPublish will no longer be supported (December 20)</li>
<li>Revamped developer site launching</li>
</ul>
<p><strong>Late 2009 / Early 2010</strong></p>
<ul>
<li> Requests API will be removed (note: Facebook says this will happen “30 days after launching new Inbox sharing”</li>
<li>Profile boxes will be removed (application tabs will be the only way to integrate into the profile page at that point)</li>
<li>Improved analytics and APIs launching</li>
</ul>
<p><strong>Early 2010</strong></p>
<ul>
<li> Open Graph API launching</li>
</ul>
<h3>Conclusion</h3>
<p>So it feels like Facebook might finally, really be getting their shit together. This is arguably one of the biggest rounds of changes to the platform that we&#8217;ve seen in quite some time, and for the first time, they&#8217;re actually giving developers a head&#8217;s up and being very transparent about timing and impact.</p>
<p>All in all, the vast majority of these changes are great news for application developers. We&#8217;re getting tons of new features, new integration points and opportunities for viral engagement. The trade-off in what we&#8217;re losing seems to be well worth it, if all of these improvements come to fruition.</p>

 <script type="text/javascript">
	<!--
		function onover(what){
	document.getElementById('blurbtext').innerHTML=''+what+'';
	}
	function onout(){
	document.getElementById('blurbtext').innerHTML='&nbsp;';
	}
	-->
	</script>



<h3 style="padding-bottom: 0px; margin-bottom: 0px;">Also check out: <br /><span id="blurbtext"><br /></span></h3>

<div id="relatedposts">




		
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2009/04/facebook-application-tabs/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2009/04/69tx0t.png&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="%$#^%$* Facebook Application Tabs" height="90" width="90" onmouseover="onover('%$#^%$* Facebook Application Tabs')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2008/09/planning-a-facebook-application/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2008/12/n40212040147_6720.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Planning Your Facebook Application" height="90" width="90" onmouseover="onover('Planning Your Facebook Application')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2009/01/advertising-on-facebook-applications-an-experiment/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2009/01/socialcash.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Advertising on Facebook Applications &#8211; An Experiment" height="90" width="90" onmouseover="onover('Advertising on Facebook Applications &#8211; An Experiment')" onmouseout="onout()" /></a></div>

	</div>

]]></content:encoded>
			<wfw:commentRss>http://www.snipe.net/2009/10/upcoming-changes-to-the-facebook-application-platform/feed/</wfw:commentRss>
		<slash:comments>38</slash:comments>
		</item>
		<item>
		<title>Awesome Gift Guide for the Geeks in Your Life</title>
		<link>http://www.snipe.net/2009/10/gift-guide-for-geeks/</link>
		<comments>http://www.snipe.net/2009/10/gift-guide-for-geeks/#comments</comments>
		<pubDate>Sat, 24 Oct 2009 13:59:36 +0000</pubDate>
		<dc:creator>snipe</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Geek Life]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[Geek Humor]]></category>
		<category><![CDATA[gifts]]></category>

		<guid isPermaLink="false">http://www.snipe.net/?p=402</guid>
		<description><![CDATA[If you’re a non-geek, trying to shop for the geeks in your life can be daunting, but we’re here to help! While there are different kinds of geeks, we assure you that buying any of this stuff as gifts for your favorite geek will definitely give you a charisma point bonus and earn you some [...]]]></description>
			<content:encoded><![CDATA[<p>If you’re a non-geek, trying to shop for the geeks in your life can be  daunting, but we’re here to help! </p>
<p>While there are different <em>kinds</em> of geeks, we assure you that buying any of this stuff as gifts for your favorite geek will definitely give you a charisma point bonus and earn you some nerd love.<br />
<span id="more-402"></span></p>
<blockquote><p><strong>Note:</strong> This was originally published on TehAwesome.net in Nov 2008. It&#8217;s being resurrected and reposted here, since I&#8217;ll be shutting down TehAwesome.Net soon, and it was too good to throw away. </p></blockquote>
<p>If you’re a geek yourself and are just looking for some new toys or gifts for your D&amp;D buddies, hopefully you’ll find something new here.</p>
<p>This list is long &#8211; it’s meant to be very comprehensive and offer up lots of choices for multiple kinds of geeks, including computer geeks, science geeks, physics geeks, design geeks and, yes, the more traditional basement-dwelling comic book geek.</p>
<h2>Geek or Nerd?</h2>
<p>There is a fine balance between something that is geeky, and something that is nerdy.</p>
<p><strong>Geek: </strong>From the Jargon File entry for “<a href="http://catb.org/jargon/html/G/geek.html" target="_blank">geek</a>“:</p>
<blockquote><p>“A person who has chosen concentration rather than conformity; one who pursues skill (especially technical skill) and imagination, not mainstream social acceptance. Geeks usually have a strong case of neophilia. Most geeks are adept with computers and treat hacker as a term of respect, but not all are hackers themselves &#8211; and some who are in fact hackers normally call themselves geeks anyway, because they (quite properly) regard `hacker’ as a label that should be bestowed by others rather than self-assumed.”</p></blockquote>
<p><strong>Nerd:</strong> From the Jargon File entry for “<a href="http://catb.org/jargon/html/N/nerd.html" target="_blank">nerd</a>“:</p>
<blockquote><p>“Pejorative applied to anyone with an above-average IQ and few gifts at small talk and ordinary social rituals.”</p></blockquote>
<p><strong>Examples:</strong></p>
<p>Chicks Dig Linux t-shirt: geeky (which is good.)</p>
<p><a href="http://giftsforengineers.com/137/index.php?main_page=product_info&amp;cPath=22_52_66&amp;products_id=625" target="_blank">“Engineers are Hot” notepad</a> &#8211; nerdy (not so good)</p>
<p>The difference is hard to explain, but <a href="http://www.wikihow.com/Tell-the-Difference-between-Nerds-and-Geeks" target="_blank">this article at wikiHow</a> does a fine job at trying to help clarify.  (The Warnings are particularly funny and accurate.) Fortunately, there is usually some crossover, so whether you’ve got a geek or a nerd on your hands, this guide should help. (I, personally, am probably a mix of both, although more geek than nerd.)</p>
<h2>Caveat</h2>
<p>This list does NOT cover items that would be considered “more useful than entertaining.” The items and stores listed here are, in general, not overly useful. It wouldn’t be possible to list everything <em>useful</em> that a geek might want, especially given the variety in the types of geeks you might have in your life. What a design geek might find useful is sometimes not at all the same thing a hardcore purist linux geek might find useful. So this particular list explores the fun and sometimes silly cultural toys that come with geekdom. If you’re looking for something <em>useful</em> for your geek and you’re not savvy in their field, you may be better off with a <a href="https://secure.newegg.com/GiftCertificate/NewGiftCertificate.aspx" target="_blank">gift certificate to NewEgg</a> so they can pick what they want. Without intimate knowledge of their gear and their setup, there’d be no way to guess what they will find more useful. Normally, gift certificates might seem a little impersonal, but your geek will appreciate the ability to select <em>exactly</em> what they want.</p>
<h2>T-Shirts &amp; Other Wearables</h2>
<p>Maybe it makes me lame, but I love me some geeky t-shirts. I work in a casual office, so I can wear t-shirts every day, and my collection of geek/gamer/snark t-shirts is a thing to behold. Seriously, I have an entire dresser drawer devoted to geeky t-shirts.</p>
<p>While that may be a little sad, if you’re looking to beef up your geek/gamer wardrobe, there’s some great stuff out there these days. And, if you’re unable to find what you’re looking for, you can always give <a href="http://www.pleasedressme.com" target="_blank">PleaseDressMe.Com</a> a whirl and see if you come up with anything good.</p>
<p>And let’s face it, what geek has ever said “No no, I have enough t-shirts, thank you!”</p>
<p>Oh, and ladies, if you’re shopping for yourselves, most of these places carry <strong>babydoll styles</strong> as well, so you can wear your geek proudly without hiding your curves.</p>
<p><strong><a href="http://www.thinkgeek.com" target="_blank">ThinkGeek</a></strong> &#8211; if you haven’t heard of them and you’re shopping for yourself, you probably shouldn’t be allowed to buy anything from them, but any geekwear list would be lacking without them. There’s something here for the code slinger, the sysadmin, the gamer, and the ‘net culture geek. And they sell all kinds of nifty cube toys and gadgets as well. And because someone had to do it, the perfect combination of technology and t-shirts, they even have a section devoted to <strong><a href="http://www.thinkgeek.com/tshirts/illuminated/" target="_blank">illuminated tees</a></strong>: t-shirts that actually <em>do stuff</em>, like play sounds, detect wifi signals and display lighted life bars.</p>
<p><strong><a href="http://www.jinx.com/member/snipe" target="_blank">Jinx</a> </strong>- Huge catalog  = gamer heaven! The cake may be a lie, but these shirts are the real deal. (I’m so, so sorry for that horrible joke.) Lots of gamer gear, with a whole section devoted to Warcraft goodies, and oodles of old school D&amp;D and RPG love. Jinx was the genius behind the <em>Children of the Cron</em> shirt that I covet so much (and they no longer make. Wah!) At least 40% of my geek shirts came from Jinx.</p>
<p><strong><a href="http://store.xkcd.com/" target="_blank">xkcd store</a></strong> &#8211; xkcd is a webcomic that appeals to geeks of many flavors, including computer geeks, physics geeks, math geeks and language geeks. (Truly, one of the funniest and most brilliant <a href="http://www.tehawesome.net/2008/09/teh-most-awesome-geeky-web-comics/" target="_blank">comics online</a>, in my opinion.)  Their store is very small, but not to be missed.</p>
<p><strong><a href="http://www.pennyarcademerch.com/" target="_blank">Penny Arcade</a></strong> &#8211; one of the staple web comics of any gamer (and plenty of non-gaming empathizers,) this store is small but has a few absolute gems.</p>
<p><strong><a href="http://www.glarkware.com/" target="_blank">Glarkware</a></strong> &#8211; A small, but brilliant collection of not-so-geeky-but-very-snarky shirts and stickers. My favorites here are their <a href="http://www.glarkware.com/adult/i-heart-irony" target="_blank">I ♥ Irony t-shirt</a>, <del datetime="2009-10-25T04:36:01+00:00">the stop-sign stickers</del> (which I have used in my own neighborhood and can say they are the very <em>definition</em> of awesome) and the <del datetime="2009-10-25T04:36:01+00:00">Urban Asshole Notification cards</del>.</p>
<p>Update: Sadly, Glarkware has stopped carrying the fabulous stop-sign stickers and Urban Asshole Notification cards. That makes me a sad panda.</p>
<p><strong><a href="http://emptees.com/tees/1611-comic-sans-detention" target="_blank">I will not use Comic Sans t-shirt</a></strong> &#8211; &#8216;Nuf said, really.</p>
<p><strong><a href="http://www.splitreason.com/" target="_blank">SplitReason</a></strong> &#8211; A fun collection of geek/gamer/pop culture shirts that are always cute, sometimes really funny, and other times a little cheeky.</p>
<p><strong><a href="http://www.nerdyshirts.com/" target="_blank">NerdyShirts.Com</a></strong> &#8211; just what it sounds like! Lots of fun retro-gaming shirts here (Zelda was FTW before FTW existed!) And now, thanks to them, I have the Reading Rainbow theme song stuck in my head. Lucky for me, I have it in my iPod.</p>
<h3>Honorable Mentions</h3>
<p><strong><a href="http://www.designbyhumans.com/" target="_blank">Design By Humans</a> </strong>has some eye-popping designs. I don’t personally shop there, as I’m not as fond of shirts with patterns that cover the entire tee, but that’s just me. Some simply stunning stuff there if that’s what you’re into, though.</p>
<p><strong><a href="http://shirt.woot.com/" target="_blank">Shirt.Woot</a></strong> is based on the same model as Woot.Com (a domain name I not-so-secretly covet and wish I had thought to buy years ago, like unobtainium dot com.) A new, exclusive shirt a day, and when its sold out, you’re shit outta luck &#8211; but many of my favorite geeks buy their threads at shirt.woot.</p>
<h2>Jewelry</h2>
<p><strong><a href="http://www.madewithmolecules.com/" target="_blank">Made with Molecules</a></strong> -VERY cool sciencegeek jewelry shaped like molecules, made out of sterling silver. These are not only incredibly geeky, but also gorgeous! These are not cheap, but the quality makes these pieces worth every penny.</p>
<p><strong><a href="http://www.fractalspin.com/x/home.php?cat=7" target="_blank">FractalSpin Geekcessories</a></strong> &#8211; Fun earrings, bracelets an other jewelery perfect for your favorite math, science or computer geek. Some of these pieces are actually made from actual capacitors and varistors! Perfect for the glamgeek!</p>
<p>Adorable <strong><a href="http://giftsforengineers.com/137/index.php?main_page=product_info&amp;cPath=22_73&amp;products_id=437" target="_blank">sterling silver compass earrings</a></strong> and <strong><a href="http://giftsforengineers.com/137/index.php?main_page=index&amp;cPath=22_73&amp;sort=20a&amp;page=2" target="_blank">other engineering related jewelry</a></strong> can be found at GiftsForEngineers.Com. This site also has some really <strong><a href="http://giftsforengineers.com/137/index.php?main_page=index&amp;cPath=22_73&amp;sort=20a&amp;page=1" target="_blank">fun cufflink designs</a></strong>, such as <strong><a href="http://giftsforengineers.com/137/index.php?main_page=product_info&amp;cPath=22_73&amp;products_id=356" target="_blank">cufflinks made from recycled circuitboards</a></strong>, or my favorite, the <strong><a href="http://giftsforengineers.com/137/index.php?main_page=product_info&amp;cPath=22_73&amp;products_id=388" target="_blank">green level cufflinks</a></strong> that are made from real itty bitty levels.</p>
<p>ThinkGeek, of course, has some very cool necklaces, including two that light up &#8211; <a href="http://www.thinkgeek.com/apparel/jewelry/791e/" target="_blank">The Fuze Necklace</a> (I own one &#8211; its delightful!) and the <strong><a href="http://www.thinkgeek.com/apparel/jewelry/b020/" target="_blank">Crystal Cube Firejewel Necklace</a></strong> (which I just came across while researching this article and am buying NOW &#8211; so pretty with the glowwy and the sparkly and the oooooh…)</p>
<p>If your geek is a she-geek with a love for D&amp;D, you MUST buy her the <strong><a href="http://www.thinkgeek.com/apparel/jewelry/7ae3/" target="_blank">d20 Spiral Necklace</a></strong>. You simply must. Its beautiful and functional, and what geek doesn’t like that?</p>
<p>Not so sparkly, but still very cute, the <strong><a href="http://www.thinkgeek.com/apparel/jewelry/a38d/" target="_blank">broken image necklace</a></strong> is a lightweight pendant that looks like, well, a broken image. See for yourself! This would be a cute gift for your favorite web designer or graphic design geek.</p>
<p>Also at ThinkGeek, the <strong><a href="http://www.thinkgeek.com/apparel/jewelry/756e/" target="_blank">Ring Thing</a></strong> (bottle opening ring) is a great gift for he-and-she-geeks alike. I’ve had mine for years now, and it’s come in handy at the most unexpected times. And yes, it really does work &#8211; you really can open bottles with it, although I wouldn’t recommend opening cases of them in a row. (Company BBQ, lots of beer, no bottle opener. My finger was a little tender by the time it was over, but BOY was I the hero.)</p>
<h2>Mugs and Gadgets</h2>
<p><strong><a href="http://w2products.com/products.builder/pantone.html" target="_blank">W2 Pantone Series</a></strong> &#8211; These are <em>unmatched</em> for the design geek in your life. (Unmatched… get it? GET IT??) Super fun mugs, espresso cups and messenger bags in your print design geek’s favorite Pantone color.</p>
<p><strong><a href="http://www.suck.uk.com/product.php?rangeID=76&amp;showBar=1" target="_blank">My Cuppa Tea/Coffee</a></strong> from Suck UK &#8211; Color matching coffee mugs with shades of coffee and tea. Very cute! Frankly, a lot of their suff is really fun, and sorta geeky, like their <a href="http://www.suck.uk.com/product.php?rangeID=98" target="_blank">alphabet ice cube trays</a>, t<a href="http://www.suck.uk.com/product.php?rangeID=90" target="_blank">he alarm clock that runs away while beeping</a>, to make you get out of bed to turn it off, or the <a href="http://www.suck.uk.com/product.php?rangeID=94" target="_blank">Who Tall are You mirror</a>, for your younger geeks-in-training.</p>
<p>If your geek is a coffee-lover, but more of a command line linux geek than a design geek, be sure to check out <strong><a href="http://www.thinkgeek.com/interests/exclusives/7bbe/" target="_blank">ThinkGeek’s Mug of Vi</a></strong>. Its okay if you don’t know what Vi is &#8211; they will. (Vi &gt; emacs 4evah!)</p>
<h2>Cthulhu-Themed</h2>
<p>H.P. Lovecraft is an old favorite of many die-hard sci-fi geeks, and Cthulhu stands tall as the most well-known and revered of his mythos. Fortunately, thanks to teh intarwebs, there are oodles and scads of places to find the most awesome Cthulhu goodies:</p>
<p><strong><a href="http://www.cthulhulives.org/store/store.lasso" target="_blank">H.P. Lovecraft Historical Society</a></strong> &#8211; If you buy nothing else for your favorite geeks this holiday season, you MUST buy the Cthulhu Christmas albums, aptly titled “<strong>A Very Scary Solstice</strong>” and “<strong>An Even Scarier Solstice</strong>.” The production quality on these albums is a thing to behold, and they are sure to brighten the face of any geek (albeit while darkening the rest of the room.) The set is sold together during the holidays as “<a href="http://www.cthulhulives.org/store/store.lasso?1=product&amp;2=122" target="_blank">An Unbearably Scary Solstice</a>“, and comes with songbooks.<strong> <a href="http://www.cthulhulives.org/store/store.lasso?1=product&amp;2=122" target="_blank">Buy it now</a></strong>. It is the embodiment of awesome.</p>
<p>The HPLHS has piles of delightfully horrific gifts in addition to the albums mentioned above, but another personal recommendation is the <strong><a href="http://www.cthulhulives.org/store/store.lasso?1=product&amp;2=12" target="_blank"><em>What part of ph’nglui mglw’nafh Cthulhu R’lyeh wgah’nagl fhtagn don’t you understand?</em> t-shirt</a></strong>. The reactions when a guy tries to get permission to stare at your boobs by asking “can I read your t-shirt” is always priceless. “Sure, if you can…”</p>
<p><strong><a href="http://dreamlandtoyworks.com/my_little_cthulhu.html" target="_blank">My Little Cthulhu</a></strong> &#8211; an adorable action figure that even has a set of adorable victims (sold separately.)</p>
<p><strong><a href="http://www.toyvault.com/cthulhu/index.html" target="_blank">Plush Cthulhu</a></strong> &#8211; there is so much fun stuff here, including Cthulhu plus toys, a Cthulhu hand puppet (the same kind used in the very funny internet show, <a href="http://www.callsforcthulhu.com/" target="_blank">Calls for Cthulhu</a>), a plush Cthulhu holiday wreath, board games and more. Note: The Toy Vault doesn’t have an online store from which to purchase these goodies, but <a href="http://www.trollandtoad.com/Toys-(Plush,-Figures-&amp;-More!)/1074-484p1n10.html" target="_blank">The Troll and Toad storefront</a> seems to carry all these and more, including themed Cthulhu toys (Cthulhu as Elvis, Cthulhu as a superhero, Cthulhu as a rock star, etc) and additional Lovecraft monsters such as a <a href="http://www.trollandtoad.com/p132672.html" target="_blank">Hound of Tindalos</a> plush and a <a href="http://www.trollandtoad.com/p104512.html" target="_blank">Nyarlathotep plush</a>.</p>
<h2>Movie, Game and TV Memorabilia</h2>
<p><strong><a href="http://www.forbiddenplanet.com/fp" target="_blank">Forbidden Planet</a></strong> &#8211; This should go without saying, but Forbidden Planet has the most amazing collection of action figures and other chachke from just about every movie or TV show that would be meaningful to a geek, including (and OMG do I love this one) a <a href="http://www.forbiddenplanet.com/products/35751/The_Dark_Crystal_Action_Figure_Skeksi_Chamberlain/Animation/Action_Figures/Dark_Crystal/Product.html" target="_blank">Dark Crystal 7″ Chamberlain figure</a>.</p>
<p><strong><a href="http://www.mcphee.com" target="_blank">Archie McPhee Toys</a></strong> &#8211; One of my favorite toy sources, McPhee has some of the funniest and most unique toys for grown-ups, including a personal favorite, the <a href="http://www.mcphee.com/items/11554.html" target="_blank">Avenging Unicorn Playset</a>.</p>
<p><strong><a href="http://wickedcoolstuff.com/" target="_blank">WickedCoolStuff</a> </strong>- another great site with tons of movie and TV-related toys, as well as some goofy novelty action figures.</p>
<p><strong><a href="http://www.amazon.com/s/ref=nb_ss_gw_0_16?url=search-alias%3Daps&amp;field-keywords=warcraft+action+figures&amp;x=0&amp;y=0&amp;sprefix=warcraft+action+" target="_blank">World of Warcraft Action Figures</a></strong> &#8211; beautifully detailed action figures from the game World of Warcraft.</p>
<p><strong><a href="http://www.williamsstreet.com/?referral_id=ASNAV" target="_blank">Adult Swim store</a></strong> &#8211; Cartoons are, of course, a staple of any geek’s media diet, and the best place for cartoons is Adult Swim on Cartoon Network. While most of the store is dedicated to selling DVDs and CDs from the network’s TV shows, there are some delightful apparel, print and <a href="http://www.williamsstreet.com/cat/Toys/Kidrobot-Adult-Swim-Mini-Series.html" target="_blank">action figure</a> surprises in there too. (I personally think Assy McGee is one of the dumbest shows ever put on television, second perhaps only to anything Tim and Eric do &#8211; they are teh suck, but the rest of the action figures are teh awesome.)</p>
<h2>Nerd Classics</h2>
<p>I don’t care whether you’re a geek or a nerd, or whether your geek comes in the form of math, physics, science, computers or something else entirely &#8211; every geek used to read Mad Magazine &#8211; so what gift could be more fun than <strong><a href="http://www.amazon.com/gp/product/B000HKMQ64?ie=UTF8&amp;tag=snipenet&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=B000HKMQ64" target="_blank">50 Years of Mad Magazine</a></strong>, scanned into PDF in a two DVD set? Nothing, that’s what!</p>
<h2>Music</h2>
<p>Music is always a little tricky, since the variety in musical taste, even among geeks, is remarkably broad. There are a few genres of music, namely nerdcore and filk, that are particularly well-suited to geeks, however, and I strongly recommend any and all of the following artists. Even if your geek doesn’t absolutely love them, they’ll appreciate the tunes for the novelty alone. If they love the music, you’ll have introduced them to music that will welcome them with open arms.</p>
<p>Nerdcore (sometimes referred to as chip-hop) is hip-hop for geeks; rap for computer programmers, bloggers, gamers and ‘net junkies. Those of you who read <a href="http://www.snipe.net" target="_blank">Snipe.Net</a> already know that I am one of nerdcore’s biggest cheerleaders, and these are my top picks based on lyrics, production value, and overall awesomeness.</p>
<p><strong><a href="http://frontalot.com/index.php/" target="_blank">MC Frontalot</a></strong>, <strong><a href="http://mclars.com/" target="_blank">MC Lars</a></strong>, <strong><a href="http://ytcracker.com/" target="_blank">YT Cracker</a></strong>, <strong><a href="http://optimusrhyme.com/" target="_blank">Optimus Rhyme</a></strong> (although they are not together anymore, you can still buy their music), <strong><a href="http://www.beefyness.com/" target="_blank">Beefy</a></strong> and <strong><a href="http://devospice.com/" target="_blank">DevoSpice</a></strong> (formerly known as Sudden Death).</p>
<p>Not nerdcore, but still very geeky and fun: <strong><a href="http://www.purepwnage.com/" target="_blank">Pure Pwnage</a></strong> and <strong><a href="http://www.jonathancoulton.com/" target="_blank">Jonathan Coulton</a></strong>.</p>
<h2>Prefer to Make Your Own?</h2>
<p>Gotcha covered. <a href="http://www.instructables.com/id/Gift_Ideas/" target="_blank">These gift ideas from Instructables</a> have some unique and sorta geeky ideas, with step by step instructions. Also be sure to check out the <a href="http://blog.makezine.com/" target="_blank">Make Magazine blog</a> for a weekly lst of fun and nerdy do-it-yourself projects. Or, if your geek is a do-it-his-or-her-selfer and likes to make something out of nothing (or the shattered remains of something else), consider getting them a <a href="https://readerservices.makezine.com/MK/Subnew.aspx?PC=MK&amp;PK=M6TRA1" target="_blank">subscription to Make Magazine</a>. And for the ecogeeks, there’s even a digitial-only subscription option that gives you access to <a href="http://www.make-digital.com/make/" target="_blank">the digital version</a>.</p>
<p>And since we’ve moved to magazines, consider a monthly subscription to <a href="http://www.geekmonthly.com/" target="_blank">Geek Magazine</a>, the most geek you can find in print, which covered movies, tech, music, games and more.</p>
<p>And finally, for the lego lovers, consider using the Lego Digital Designer and <strong><a href="http://ldd.lego.com/" target="_blank">coming up with your own fabulous lego gift masterpiece</a></strong>. Freeware application Lego Digital Designer is a virtual Lego kit for your Windows or Mac desktop. Once installed, you can either use LDD to build your own masterpiece from scratch or—if you’re lacking patience—you can get a head start by using one of their starter models. With over 763 brick types to choose from, your LDD-design will have reached well beyond the limits of your normal lego kit. Once you’ve built the perfect prototype, you can upload the results to the Lego web site to order a custom kit with every brick you’ll need included! Lego Digital Designer is freeware, Windows and Mac only.</p>
<h2>Box-Toppers &amp; Stocking Stuffers</h2>
<p>For smaller gifty-stuff, suitable for people you’re not willing to spend much money on, or for putting on the top of the “real” gift box as an extra something, these stickers and trinkets add that extra something:</p>
<p>Stickers are always a fun, relatively cheap (usually under $5) box-topper, and with all the hardware your geeks are likely toting, they won’t run out of places to put them. <a href="http://www.thinkgeek.com/homeoffice/stickers/" target="_blank">Thinkgeek has a great selection of stickers</a>, and <a href="http://www.jinx.com/other_swag/stickers" target="_blank">Jinx’s collection</a> is perfectly tailored to the gamer geek. Note: the World of Warcraft <a href="http://www.jinx.com/world_of_warcraft/stickers/horde_cutout.html?catid=46&amp;cs=2&amp;csd=46" target="_blank">Horde</a> and <a href="http://www.jinx.com/world_of_warcraft/stickers/alliance_cutout.html?catid=46&amp;cs=2&amp;csd=46" target="_blank">Alliance</a> cutout stickers are gorgeous, but larger than you might first imagine, 6″x8″, so just keep that in mind. I really wish they had smaller ones I could put on my laptop. <a href="http://www.stickerton.com/stickers/geek-stickers.html" target="_blank">Stickerton</a> also has a small collection of geek stickers, and their anti-OS stickers (<span style="text-decoration: line-through;">MSFT</span>, <span style="text-decoration: line-through;">LINUX</span>, etc) are sure to piss off a few opposing factions.</p>
<p>Or check out the tutorial on Instructables.Com that <a href="http://www.instructables.com/id/Computer-Bugs/" target="_blank">teaches you how to make the cutest little computer bugs from old computer parts</a>. These are seriously adorable, and pretty easy to make if you’re comfy with a soldering iron.</p>
<p><img class="aligncenter size-full wp-image-181" title="Bugs" src="http://www.snipe.net/wp-content/uploads/2009/10/bugs.jpg" alt="" width="500" height="297" /></p>
<p>Or, if you’re not so much a DIYer, you can <a href="http://www.collectiblecomputerbugs.com/" target="_blank">buy computer bugs here</a>. And if you don’t like the geek in your life very much, you can buy them actual live bugs <a href="http://wardsci.com/category.asp?c=200369&amp;sid=google&amp;cm_mmc=google-_-cpc-_-ward-_-buybugs&amp;gclid=CN_6m7ychJcCFQFvGgodrjCaYg&amp;bhcd2=1227199731" target="_blank">here</a>.</p>
<p>And of course, the finishing touches are *everything* &#8211; so don’t forget to wrap your geeky goodies in the <strong><a href="http://www.thinkgeek.com/homeoffice/posters/7a5c/" target="_blank">ThinkGeek wrapping paper</a></strong>, featuring gift wrapping paper with emoticons, binary code, mathematical equations and even Klingon.</p>
<p>So that’s our list &#8211; do you have your own sources for geek toys, shirts and other fun-but-useless madness? If so, leave it for us in the comments!</p>

 <script type="text/javascript">
	<!--
		function onover(what){
	document.getElementById('blurbtext').innerHTML=''+what+'';
	}
	function onout(){
	document.getElementById('blurbtext').innerHTML='&nbsp;';
	}
	-->
	</script>



<h3 style="padding-bottom: 0px; margin-bottom: 0px;">Also check out: <br /><span id="blurbtext"><br /></span></h3>

<div id="relatedposts">




		
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2009/02/photoshop-tutorials-that-will-change-your-life/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2009/02/explosion_test600.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Photoshop Tutorials That Will Change Your Life" height="90" width="90" onmouseover="onover('Photoshop Tutorials That Will Change Your Life')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2009/01/buy-sell-gift-cards-online/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2009/01/gift-cards-group.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Buy or Sell Unwanted Gift Cards Online For Amazing Deals" height="90" width="90" onmouseover="onover('Buy or Sell Unwanted Gift Cards Online For Amazing Deals')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2007/11/stupid-monsters-someone-was-paid-to-make/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2008/06/dd-beasts-senmurv-gay-pride.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Stupid Monsters Someone Was Paid to Make" height="90" width="90" onmouseover="onover('Stupid Monsters Someone Was Paid to Make')" onmouseout="onout()" /></a></div>

	</div>

]]></content:encoded>
			<wfw:commentRss>http://www.snipe.net/2009/10/gift-guide-for-geeks/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Trying Out Disqus</title>
		<link>http://www.snipe.net/2009/10/trying-out-disqus/</link>
		<comments>http://www.snipe.net/2009/10/trying-out-disqus/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 05:48:58 +0000</pubDate>
		<dc:creator>snipe</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[commenting]]></category>
		<category><![CDATA[comments]]></category>
		<category><![CDATA[dsqus]]></category>
		<category><![CDATA[facebook connect]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[openid]]></category>
		<category><![CDATA[social networks]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[viral]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://www.snipe.net/?p=2424</guid>
		<description><![CDATA[I&#8217;ve decided to move the comment system on Snipe.Net over to Disqus. I like it so far, but I&#8217;ve run into a few glitches and challenges that I thought I&#8217;d share with you. (Also, it explains why things may look funny here for a few days while I work out the display kinks.) What&#8217;s Disqus? [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve decided to move the comment system on Snipe.Net over to Disqus. I like it so far, but I&#8217;ve run into a few glitches and challenges that I thought I&#8217;d share with you. (Also, it explains why things may look funny here for a few days while I work out the display kinks.)<br />
<span id="more-2424"></span></p>
<h2>What&#8217;s Disqus?</h2>
<p><a href="http://disqus.com/">Disqus</a> is a commenting system that you can apply to any website. If you&#8217;ve got a static site that you want to enable comments on without mucking around with databases and scripting languages, Disqus might be something you want to look into. Disqus can also be used (as in this case) as a replacement for a standard commenting system like WordPress&#8217; native comments. Oh, and did I mention it&#8217;s free?</p>
<p><b>I&#8217;d like to be very clear here with regard to what Disqus is NOT. </b>Disqus is not a content management/blogging platform. It would not replace your WordPress or Movable Type installation, and the way by which you post new content. It handles only the comments, and is basically agnostic to your actual site content.</p>
<p>I&#8217;ve known about Disqus for years, but normal WordPress commenting was enough to do the job for me, so I never bothered investigating it much, but with the emergence of third-party login connections like Facebook Connect, Twitter&#8217;s OAuth, OpenID, and so on, I realized I wanted to offer these ways of authenticating to my site users. Hacking WordPress (or using several clunky and sometimes conflicting plugins) for each one of these authentication methods wasn&#8217;t something I had the energy to do, plus Disqus offers a few additional features I really liked, such as tracking &#8220;reactions&#8221; and the ability for users to upload a video response.</p>
<p>Disqus isn&#8217;t the only one doing this. <a href="http://intensedebate.com/">IntenseDebate.Com</a> offers very similar services and an almost comparable feature set. I set up an IntenseDebate account and even set up the WordPress plugin, but ended up a little underwhelmed, for reasons that are outside the scope of this article. If you&#8217;re interested in comparing the two, <a href="http://dox.deuts.net/intensedebate-vs.-disqus">check out this wiki page</a> by <a href="http://deuts.org">deuts.org</a>.</p>
<h2>Why Disqus?</h2>
<p>What really convinced me that Disqus was stable and strong enough to give it a shot is the fact that <a href="http://www.mashable.com">Mashable.Com</a> uses Disqus exclusively to handle their site comments, and that&#8217;s kind of a big deal. As a frequent visitor to Mashable, I always love being able to one-click login to reply, and seeing the &#8220;reactions&#8221; is always interesting to me. </p>
<p>I&#8217;ve already mentioned a few of the things I really like about Disqus &#8211; and for a full feature set, <a href="http://disqus.com/">visit their website</a> and click on the &#8220;This is why you should too&#8221; link on their homepage &#8211; but these were the key factors for me:</p>
<p><strong>Ability for a commenter to use </strong><strong>Facebook</strong>, <strong>Twitter</strong>, <strong>OpenID</strong>, <strong>Yahoo</strong> and other networks to authenticate and post. This was probably the most important factor. I had <a href="http://www.snipe.net/2009/01/trying-out-facebook-connect/">previously hacked together some Facebook Connection functionality</a>, but it was a massive pain in the ass, and would cause the page to reload itself once on every page load in Firefox. Really annoying. Plus, I wanted to widen the net to OpenID and Twitter, without a lot of extra work. Logging in is still optional, but more features are available if the user logs in using one of the methods offered.</p>
<p><strong>Facebook Newsfeeds.</strong> This was part of the reason I had originally hooked up Facebook Connect to the site in the first place &#8211; the ability to allow the user to post a notification to Facebook that they have just commented on my site. I am intimately, painfully aware of the effectiveness of the Facebook news feed in spreading content because of my extensive work <a href="http://www.snipe.net/tags/facebook-applications/">developing Facebook applications</a>, so this was a feature I definitely wanted.</p>
<p>Incidentally, when you sign up for Disqus, they give you an API key based off of <a href="http://wiki.developers.facebook.com/index.php/Facebook_Connect_Fourth_Party_Code">Facebook&#8217;s new fourth-party functionality</a> that lets services like Disqus create an application on the fly. IntenseDebate, on the other hand, asks you to manually create an application in Facebook and then enter your API key. </p>
<p><strong>Ability to track Reactions. </strong>As I&#8217;ve mentioned, this is a feature I really like about Disqus. Reactions are similar to trackbacks, although my WordPress has never been great about capturing all of the places one of my posts might have been mentioned, especially social networks. Reactions let you mine social comments and mentions from places such as Twitter, FriendFeed, Digg, and YouTube, then display them with your comments:</p>
<p><img src="http://www.snipe.net/wp-content/uploads/2009/10/Screen-shot-2009-10-23-at-12.12.37-AM-560x373.png" alt="Screen shot 2009-10-23 at 12.12.37 AM" title="Screen shot 2009-10-23 at 12.12.37 AM" width="560" height="373" class="aligncenter size-large wp-image-2427" /></p>
<p><strong>&#8220;Record a video&#8221; option.</strong> While I absolutely do not expect anyone who visits this blog regularly to ever record a video response (and frankly it would probably be a little creepy if they did), this was interesting to me for another project I&#8217;m working on where that type of thing would totally make sense, so I figured I&#8217;d include it and see how it worked.</p>
<p><strong>Response rating.</strong> The &#8220;like&#8221; functionality is something I think is useful to get an idea of who the people are who are contributing the most valuable comment content to the site.</p>
<p><strong>Email notifications of follow-up comments. </strong>This is something I have had for a while on Snipe.Net by way of a WordPress Plugin called <a href="http://wordpress.org/extend/plugins/subscribe-to-comments/">Subscribe to Comments</a> &#8211; and it is such essential functionality, it actually surprises me that WordPress hasn&#8217;t made this part of the core yet.  The Subscribe to Comments plugin worked fine, although it was a little on the clunky side to customize the look+feel. </p>
<p>So that&#8217;s what I was looking for. All of the functions above work as advertised, from what I can see so far, so I&#8217;m happy about that. </p>
<h2>The Challenges</h2>
<p>Everything was not exactly smooth sailing to start off with though, and I&#8217;m still trying to deal with some frustrations that come with Disqus. Depending on how customized your look and feel is, these may not even be issues for you, but since my site design is heavily stylized, it&#8217;s actually giving me some headaches. I&#8217;ll get into more detail in this section.</p>
<p><strong>Import didn&#8217;t work.</strong> Disqus lets you import your existing blog comments from a variety of blogging platforms, including self-hosted WordPress installs, Blogger, Drupal, Joomla, Movable Type, Tumblr, Sandvox, chi.mp, Squarespace and more. I apparently was one of a handful of people affected by a temporary bug in their importer, and while it was frustrating at the time, they got it sorted the same day. I had emailed support, left a few blog comments on their blog and didn&#8217;t hear back, but they did eventually tag me back on <a href="http://twitter.com/Disqus">Twitter</a>. (Annoying that they didn&#8217;t respond with an acknowledgment of the issue before it had been fixed though. A &#8220;we&#8217;re looking into it&#8221; would have been nice, rather than leaving me wondering if anyone was there.)</p>
<p><strong>Pain in the ass to style.</strong> The <a href="http://disqus.com/docs/css/">documentation on the styles used in Disqus</a> is not exactly extensive. They basically tell you which CSS ids are used for a small handful of the elements in the Disqus thread block, but everything else you have to figure out on your own using <a href="http://getfirebug.com/">Firebug</a>. </p>
<p><strong>Not a lot of flexibility in layout. </strong>This may not affect you at all if you&#8217;re using a pretty standard blog template. Mine was written from scratch, and although I still use a lot of the typical WordPress conventions (the HTML/CSS ids for the sidebar, for example), since you cannot actually modify the HTML that is output from the javascript calls, it can be limiting. </p>
<p>I had to take down my &#8220;Latest Comments&#8221; widget from the sidebar, since that was based on WordPress comments and it wouldn&#8217;t see any Disqus comments &#8211; but the Disqus javascript they provide to display most recent comments looked like braised ass in Marsala sauce when I tossed it into the sidebar. I may be able to work with it a little more, forcing my will through CSS alone, but this is time-consuming and even more annoying since there is no documentation on the styles being used there. I&#8217;ll keep plugging away at it, but if they let me define my own HTML containers for, say, the avatar and the text separately, it would be a lot easier. </p>
<p>Also, the &#8220;x comments&#8221; text that I usually have on the label over the blog image in both the blog post itself and on the category, homepage and tag pages is now basically sorta busted. Disqus uses javascript to fill in these areas, but you cannot customize the text from what I can see. Since my blog was designed with room for only &#8220;x comments&#8221;, not &#8220;x comments and y reactions&#8221;, this is making things look a little weird. I may have to actually redesign some of the sections to accommodate this issue, which makes me cranky.</p>
<p>In the Disqus admin, you only have three basic templates to pick from for your comments area display, none of which really rocked my socks. I picked the one that was the least weird-looking with my heavily stylized blog design, but as you can see, it still looks weird and amorphous. I&#8217;ll have to spend some time combing through the styles manually with Firebug to see how much I can improve that.</p>
<p><b>Also, protip: </b>If your <a href="http://wiki.disqus.net/WordPressHelp#CommentCountonPermalinks.23">comment counts are not displaying properly</a> on your index/category pages, be sure to check the box in the WordPress Disqus Advanced Options in your WordPress admin:</p>
<p><img src="http://www.snipe.net/wp-content/uploads/2009/10/wordpress-02.jpg" alt="wordpress-02" title="wordpress-02" width="451" height="43" class="aligncenter size-full wp-image-2439" /></p>
<p>They don&#8217;t make it abundantly clear what checking that box does, but my comment count wasn&#8217;t being displayed on my homepage until I checked that box.</p>
<p><strong>Some features a little buggy.</strong> For example, default avatar upload isn&#8217;t working. I expect this is a temporary issue, but it&#8217;s frustrating having a brandy new comment system and seeing the shitty gray default Disqus icon all over the place. It&#8217;s great that you can upload your own default icon for your site, but it&#8217;s only great if it actually works.</p>
<p>Also, in the custom CSS section of the Disqus.Com admin area, they suggest you use @import to import an externally hosted style sheet. Only that didn&#8217;t work at all.</p>
<p>And finally, for some reason, the comment count at the top of the blog posts pages isn&#8217;t working at all, which is why you just see &#8220;comments&#8221; in the masking tape area above the blog image, instead of &#8220;x comments.&#8221; Not sure what&#8217;s up with that, but I&#8217;ll be pestering them about it later.</p>
<p><strong>Standard paranoia. </strong>Since the blog comments no longer live on my server, if something were to happen to Disqus, temporarily or forever (DDoS, network outage, bankruptcy, etc), I&#8217;d be shit outta luck, same as happens any time you rely on a third-party system to host your content. Again, my concerns are slightly assuaged by the fact that Mashable trusts them.</p>
<h2>The API</h2>
<p>If you&#8217;re feeling ambitious, Disqus has a rudimentary API set up, however their documentation on this is arguably worse than any I&#8217;ve seen, and I&#8217;ve wrangled some gnarly APIs in my day. I should rephrase that &#8211; the <a href="http://groups.google.com/group/disqus-dev/web/api-1-1">API function documentation</a> is adequate, but they leave out some really important details. Every request you make using their API requires either a forum API key or a user API key &#8211; only they don&#8217;t tell you WHERE you&#8217;re supposed to find your API keys in the first place. </p>
<p>So you&#8217;ve got a shiny new car, and an operators manual &#8211; but no freaking keys. NO WHERE in your dashboard does it tell you what your user API key is, and without that, you cannot find out your forum API key, forum id numbers, or anything else at all. </p>
<p><strong>If you&#8217;re a standard site/blog owner who just wants to add comments to your site, you will probably never need to even look at the API</strong>, but in the off chance you actually end up tinkering with the API, here&#8217;s how you find out ALL of your API key and forum id information. Hopefully it will spare you the frustration and headache I went through to figure it out.</p>
<p>If you were writing a script to access the API, you might use something like cURL in PHP. To test these functions out, you can just use a command line terminal or ssh terminal using cURL as long as the machine you&#8217;re logged into via shell has cURL installed. The API responses are in JSON format.</p>
<p>You need to perform these in order, since each step relies on the information you obtained in the previous step.</p>
<p><strong>1. To get your Disqus User API key </strong>(which you need to obtain your Forum API key and everything else):<br />
Login to Disqus.Com, and go to this url &#8211; <a href="http://disqus.com/api/get_my_key/">http://disqus.com/api/get_my_key/</a></p>
<p><strong>2. To get your Disqus Forum ID:</strong><br />
Via command line, type:<br />
[sourcecode lang=shell]curl -0 -L &#8220;http://disqus.com/api/get_forum_list?user_api_key=_USER_API_KEY_&#8221;[/sourcecode]</p>
<p>You&#8217;ll get a JSON response that looks like this:<br />
[sourcecode language='html']{&#8220;message&#8221;: [{"created_at": "2009-10-22 10:05:15.657635",<br />
"shortname": "snipenet", "id": "123456", "name": "Snipe.Net"}], &#8220;code&#8221;: &#8220;ok&#8221;,<br />
&#8220;succeeded&#8221;: true}[/sourcecode]</p>
<p><strong>3. To get your Disqus Forum API Key for the Forum ID:</strong><br />
Via command line, type:<br />
[sourcecode language='html']curl -0 -L &#8220;http://disqus.com/api/get_forum_api_key?user_api_key=_USER_API_KEY_&#038;forum_id=123456&#8243;[/sourcecode]<br />
where the Disqus Forum IS you obtained from step 2 is &#8217;123456&#8242;.  The message field in the JSON response should contain your API key, so you&#8217;ll see something like this:</p>
<p>[sourcecode language='html']{&#8220;message&#8221;: &#8220;LONG_STRING_OF_LETTERS_AND_NUMBERS&#8221;, &#8220;code&#8221;: &#8220;ok&#8221;, &#8220;succeeded&#8221;: true}[/sourcecode]</p>
<p>Now that you&#8217;ve got all THAT, you can actually move forward with interacting with the API, as per the documentation.</p>
<h2>Conclusion</h2>
<p>It&#8217;s a little early in the game to know whether or not making the switch to Disqus was the right one. Fortunately, reverting it back to WordPress comments will take a lot less work than switching it to Disqus did, if it comes down to that. </p>
<p>I think Disqus will work out very well, and I&#8217;m excited about the new features it brings to my site, even if some of the styling and layout limitations are frustrating.</p>
<p>But hey, if you actually made it through this long, drawn-out post, leave me a comment so I can test how well Disqus is working <img src='http://www.snipe.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

 <script type="text/javascript">
	<!--
		function onover(what){
	document.getElementById('blurbtext').innerHTML=''+what+'';
	}
	function onout(){
	document.getElementById('blurbtext').innerHTML='&nbsp;';
	}
	-->
	</script>



<h3 style="padding-bottom: 0px; margin-bottom: 0px;">Also check out: <br /><span id="blurbtext"><br /></span></h3>

<div id="relatedposts">




		
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2009/12/comment-count-bug-disqus/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2009/12/johnny.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Fixing Comment Count Bug in Disqus on WordPress" height="90" width="90" onmouseover="onover('Fixing Comment Count Bug in Disqus on WordPress')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2009/12/final-fail-of-the-year/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2009/12/youfail.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Final Fail of the Year" height="90" width="90" onmouseover="onover('Final Fail of the Year')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2008/06/my-favorite-blogging-tools/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2008/06/twitter21.png&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="My favorite blogging tools" height="90" width="90" onmouseover="onover('My favorite blogging tools')" onmouseout="onout()" /></a></div>

	</div>

]]></content:encoded>
			<wfw:commentRss>http://www.snipe.net/2009/10/trying-out-disqus/feed/</wfw:commentRss>
		<slash:comments>43</slash:comments>
		</item>
		<item>
		<title>Extending Facebook Static FBML Tabs with Dynamic Content</title>
		<link>http://www.snipe.net/2009/10/mini-site-facebook-static-fbml/</link>
		<comments>http://www.snipe.net/2009/10/mini-site-facebook-static-fbml/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 06:16:00 +0000</pubDate>
		<dc:creator>snipe</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[fbjs]]></category>
		<category><![CDATA[fbml]]></category>
		<category><![CDATA[static fbml]]></category>

		<guid isPermaLink="false">http://www.snipe.net/?p=2335</guid>
		<description><![CDATA[This tutorial walks you through how to use DynamicFBML to do simple content replacement that will allow you to fit more content into your tabs. You can create image or video galleries, or even an entire micro-site inside your Static FBML tab without a lot of complicated scripting. If you&#8217;re not sure what Static FBML [...]]]></description>
			<content:encoded><![CDATA[<p>This tutorial walks you through how to use DynamicFBML to do simple content replacement that will allow you to fit more content into your tabs. You can create image or video galleries, or even an entire micro-site inside your Static FBML tab without a lot of complicated scripting.<br />
<span id="more-2335"></span><br />
<strong>If you&#8217;re not sure what Static FBML is, check out my <a href="http://www.snipe.net/2009/06/fb-fanpages-fbml-box/">previous tutorial</a> that shows you how powerful the <a href="http://www.facebook.com/apps/application.php?id=4949752878&#038;ref=search&#038;sid=615120040.2195135..1">Static FBML application</a> can be, and how you can create very compelling, highly branded Facebook Fan page tabs without the hassle of building a custom Facebook application. </strong></p>
<p>At its most basic, the functionality we&#8217;re discussing is simply one or more text or image links that, when clicked, cause content in a set space to change. Some potential uses:</p>
<ul>
<li><a href="http://www.facebook.com/pages/SnipeNet/116633947708?v=app_11007063052" target="_blank">Dynamic image gallery</a> where the user clicks on a thumbnail to see a larger version of the image</li>
<li><a href="http://www.facebook.com/vitaminwater?v=app_17037175766" target="_blank">Video gallery</a> that allows you to include thumbnails on the video that loads the selected video into a single player space. This can be particularly helpful in tightly designed Static FBML pages where you have limited space to display a lot of content.</li>
<li>Or even <a href="http://www.facebook.com/pages/SnipeNet/116633947708?v=app_7146470109" target="_blank">using your Static FBML tab as a mini-site</a>, replacing the entire tab&#8217;s content with new content to simulate multiple pages</li>
</ul>
<p>We&#8217;re going to explore a few examples in this article, but it&#8217;s basically the same code regardless of how you apply it. First, let&#8217;s look at creating a micro-site within a Facebook Static FBML tab &#8211; <strong><a href="http://www.facebook.com/pages/SnipeNet/116633947708?v=app_7146470109" target="_blank">see a live demo of the tab we&#8217;re going to create here</a></strong>. </p>
<p><strong>Notice the navigation within the tab itself (Home, Specials, Locations, About).</strong> Clicking on them displays new content in the entire tab without actually reloading the page. This is an example of Facebook&#8217;s DynamicFBML, and you won&#8217;t believe how easy it is to implement. Seriously, you won&#8217;t. </p>
<p><a href="http://www.facebook.com/pages/SnipeNet/116633947708?v=app_7146470109" target="_blank"><img src="http://www.snipe.net/wp-content/uploads/2009/10/snipe_tab-560x295.jpg" alt="snipe_tab" title="snipe_tab" width="560" height="295" class="aligncenter size-large wp-image-2370" /></a></p>
<p>So, okay&#8230; maybe that tab isn&#8217;t the fanciest thing you&#8217;ve ever seen, but it gives you a clear idea of how this works. How plain or sophisticated the design is depends entirely on you and how comfy you are in a graphics program. </p>
<p>If you dig the cool-looking button CSS in the test page, you can learn how to get that effect by visiting <a href="http://www.zurb.com/article/266/super-awesome-buttons-with-css3-and-rgba" target="_blank">ZurbBlog&#8217;s post on Super Awesome Buttons with CSS3 and RGBA</a>.</p>
<p>But here&#8217;s the great part: the code needed to create that tab is basically this:</p>
<p>[sourcecode lang='html']<!-- navigation elements --><br />
<a href="#" clicktoshow="nav1" clicktohide="nav2,nav3,nav4">Home</a><br />
<a href="#" clicktoshow="nav2" clicktohide="nav1,nav3,nav4">Specials</a><br />
<a href="#" clicktoshow="nav3" clicktohide="nav1,nav2,nav4">Locations</a><br />
<a href="#" clicktoshow="nav4" clicktohide="nav1,nav2,nav3">About</a></p>
<p><!-- Content to display when user clicks on the Home tab --></p>
<div id="nav1">
	Homepage text
</div>
<p><!-- Content to display when user clicks on the Specials tab --></p>
<div id="nav2" style="display: none;">
	Specials text
</div>
<p><!-- Content to display when user clicks on the Locations tab --></p>
<div id="nav3" style="display: none;">
	Locations text
</div>
<p><!-- Content to display when user clicks on the About tab --></p>
<div id="nav4" style="display: none;">
	About text
</div>
<p>[/sourcecode]</p>
<p><strong>Seriously. That&#8217;s it. That&#8217;s ALL there is to it. </strong>Naturally, I stripped out the extraneous text, images and styles from my demo for simplicity&#8217;s sake, but that&#8217;s honestly it. </p>
<p>This is arguably the one thing that is <strong>exactly as easy as it appears to be</strong> with regard to developing anything for Facebook.</p>
<p>This code is fairly straightforward, but let&#8217;s take a look at what&#8217;s happening here.</p>
<p>In the first part, we&#8217;re setting our links. For the micro-site, these are our navigation links. Everything here looks like pretty standard HTML except for the extra &#8220;clicktoshow&#8221; and &#8220;clicktohide&#8221; elements. (Note: The links<em> do not</em> have to be set before the content divs &#8211; you&#8217;ll set them wherever they make sense in your design. You&#8217;ll see an example of this further down the article in the image gallery sample.)</p>
<p>[sourcecode lang='html']<!-- navigation elements --><br />
<a href="#" clicktoshow="nav1" clicktohide="nav2,nav3,nav4">Home</a><br />
<a href="#" clicktoshow="nav2" clicktohide="nav1,nav3,nav4">Specials</a><br />
<a href="#" clicktoshow="nav3" clicktohide="nav1,nav2,nav4">Locations</a><br />
<a href="#" clicktoshow="nav4" clicktohide="nav1,nav2,nav3">About</a>[/sourcecode]</p>
<p>The <strong>clicktoshow</strong> element allows you to specify the id&#8217;s of the elements you wish to <em>show</em> when the link is clicked. Conversely, the <strong>clicktohide</strong> element allows you to specify the ids of the elements you wish to <em>hide</em> when the link is clicked.</p>
<p>In our navigation elements, since the div that contains the homepage text is set as nav1 in our HTML, we want the <strong>clicktoshow for the Home link to be nav1</strong> (since we want that div to show when we click on it.) Likewise, since we&#8217;re completely replacing whatever div is currently visible with the nav1 div contents, we want to specify <strong>everything that isn&#8217;t nav1 in the clicktohide</strong>.</p>
<h2>Combining divs in hide/show</h2>
<p>What&#8217;s particularly fun about the clicktoshow and clicktohide (other than their sheer ease of use) is the fact that unlike a more complicated true JavaScript version, showing and hiding two or more divs at the same time on the same click is simply a matter of specifying them in the clicktohide or clicktoshow parameters.</p>
<p>[sourcecode lang='html']<!-- set up our text links --><br />
<a href="#" clicktoshow="nav1" clicktohide="nav2,nav3">Oh</a><br />
<a href="#" clicktoshow="nav2" clicktohide="nav1,nav3">Hai</a><br />
<a href="#" clicktoshow="nav1,nav2" clicktohide="nav3">Oh Hai</a><br />
<a href="#" clicktoshow="nav1,nav2,nav3">Oh Hai SRSLY!</a></p>
<p><!-- Content to display when user clicks on the Home tab --></p>
<div id="nav1">
	Oh
</div>
<p><!-- Content to display when user clicks on the Specials tab --></p>
<div id="nav2" style="display: none;">
	Hai
</div>
<p><!-- Content to display when user clicks on the Locations tab --></p>
<div id="nav3" style="display: none;">
	SRSYLY!
</div>
<p>[/sourcecode]</p>
<p>In the snippet above, we&#8217;re using only three divs with four nav elements. By specifying multiple ids in the clicktoshow parameter, we can show multiple divs at once, so when you click on &#8220;Oh Hai SRSLY!&#8221;, you&#8217;re looking at nav1, nav2 and nav3 all being shown at once. Piece of pie.</p>
<p><a href="http://www.facebook.com/pages/SnipeNet/116633947708?v=app_6009294086" target="_blank"><img src="http://www.snipe.net/wp-content/uploads/2009/10/snipe_tab_funky-560x220.jpg" alt="snipe_tab_funky" title="snipe_tab_funky" width="560" height="220" class="aligncenter size-large wp-image-2379" /></a></p>
<h2>Example Image Gallery</h2>
<p>One more example that will hopefully get your creative juices going &#8211; let&#8217;s look at how to do an image gallery using only clicktoshow and clicktohide. </p>
<p>In this gallery, we have a set of thumbnails with one large space set aside in our design where the fullsize image will display. You can see a <a href="http://www.facebook.com/pages/SnipeNet/116633947708?v=app_11007063052" target="_blank">simple demo of this gallery here</a>.</p>
<p><a href="http://www.facebook.com/pages/SnipeNet/116633947708?v=app_11007063052" target="_blank"><img src="http://www.snipe.net/wp-content/uploads/2009/10/gallery-560x511.jpg" alt="gallery" title="gallery" width="560" height="511" class="aligncenter size-large wp-image-2389" /></a></p>
<p>Now take a look at the sourcecode below. Notice that <strong>we&#8217;re using the exact same code as we used in the other examples </strong>- we&#8217;ve just changed the names of the divs so they make more sense semantically in a gallery. </p>
<p>[sourcecode lang='html']<!-- set the divs for the fullsize images --></p>
<div id="image1">
	<img src="http://www.snipe.net/wp-content/uploads/2009/10/full-1.jpg" />
</div>
<div id="image2" style="display: none;">
	<img src="http://www.snipe.net/wp-content/uploads/2009/10/full-2.jpg" />
</div>
<div id="image3" style="display: none;">
	<img src="http://www.snipe.net/wp-content/uploads/2009/10/full-3.jpg" />
</div>
<div id="image4" style="display: none;">
	<img src="http://www.snipe.net/wp-content/uploads/2009/10/full-4.jpg" />
</div>
<p><!-- set up our thumbnails --><br />
<a href="#" clicktoshow="image1" clicktohide="image2,image3,image4"><br />
	<img src="http://www.snipe.net/wp-content/uploads/2009/10/thumb-1.jpg" /><br />
</a></p>
<p><a href="#" clicktoshow="image2" clicktohide="image1,image3,image4"><br />
	<img src="http://www.snipe.net/wp-content/uploads/2009/10/thumb-2.jpg" /><br />
</a></p>
<p><a href="#" clicktoshow="image3" clicktohide="image1,image2,image4"><br />
	<img src="http://www.snipe.net/wp-content/uploads/2009/10/thumb-3.jpg" /><br />
</a></p>
<p><a href="#" clicktoshow="image4" clicktohide="image1,image2,image3"><br />
	<img src="http://www.snipe.net/wp-content/uploads/2009/10/thumb-4.jpg" /><br />
</a>[/sourcecode]</p>
<p>By the way &#8211; if you dig the images used in that sample gallery, <strong>be sure to check out the <a href="http://www.snipe.net/2009/10/the-great-pumpkin-roundup/">Great Pumpkin Roundup post</a></strong> that shows examples of some of the most amazing pumpkin carving you&#8217;ve ever seen in your whole life.</p>
<p>In a <a href="http://www.facebook.com/vitaminwater?v=app_17037175766" target="_blank">project for vitamin water</a>, I needed to create what appeared to be a dynamic video player, using only the default Facebook media player, which doesn&#8217;t support options like having a playlist where people can click on a gallery of thumbnails and load the video into a single player. See below:</p>
<p><a href="http://www.facebook.com/vitaminwater?v=app_17037175766" target="_blank"><img src="http://www.snipe.net/wp-content/uploads/2009/10/new_moon_tab-560x533.jpg" alt="new_moon_tab" title="new_moon_tab" width="560" height="533" class="aligncenter size-large wp-image-2339" /></a></p>
<p>The code used to pull this off is almost identical to the image gallery example above. No foolin&#8217;.</p>
<h2>But wait &#8211; there&#8217;s more!</h2>
<p>An additional DynamicFBML function that you may find useful is <a href="http://wiki.developers.facebook.com/index.php/Clicktotoggle" target="_blank">Clicktotoggle</a>, which is very similar to Clicktoshow and Clicktohide, except instead of turning visibility on and off by clicking on on different links, you toggle visibility on and off by clicking the same link.</p>
<h2>Your takeaway</h2>
<p>While I certainly hope that the code presented here will be useful to you, the concept of what you can do using clicktoshow and clicktohide is more important. You&#8217;re not limited to creating a micro-site or an image gallery. Get creative and have some fun with this. Not many people are being adventurous in their Static FBML tabs yet, so you have an opportunity to really wow your users with your newfound skills.</p>
<h2>Additional Resources</h2>
<ul>
<li>Facebook Developers Wiki &#8211; <a href="http://wiki.developers.facebook.com/index.php/DynamicFBML/Visibility" target="_blank">DynamicFBML/Visibility</a></li>
<li>Facebook Developers Wiki &#8211; <a href="http://wiki.developers.facebook.com/index.php/Clicktoshow" target="_blank">Clicktoshow</a></li>
<li>Facebook Developers Wiki &#8211; <a href="http://wiki.developers.facebook.com/index.php/Clicktohide" target="_blank">Clicktohide</a></li>
<li>Facebook Developers Wiki &#8211; <a href="http://wiki.developers.facebook.com/index.php/Clicktotoggle" target="_blank">Clicktotoggle</a></li>
</ul>

 <script type="text/javascript">
	<!--
		function onover(what){
	document.getElementById('blurbtext').innerHTML=''+what+'';
	}
	function onout(){
	document.getElementById('blurbtext').innerHTML='&nbsp;';
	}
	-->
	</script>



<h3 style="padding-bottom: 0px; margin-bottom: 0px;">Also check out: <br /><span id="blurbtext"><br /></span></h3>

<div id="relatedposts">




		
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2010/05/static-fbml-microsite-next-level/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2009/10/alison-fixed1.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Taking Your Static FBML Microsite to the Next Level" height="90" width="90" onmouseover="onover('Taking Your Static FBML Microsite to the Next Level')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2009/06/fb-fanpages-fbml-box/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2009/04/facebook_pic.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Static FBML: Not Every Facebook Fan Page Needs An Application" height="90" width="90" onmouseover="onover('Static FBML: Not Every Facebook Fan Page Needs An Application')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2004/06/dynamic-watermarkstext-overlay-on-images-in-php/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2008/06/picture-31.png&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Dynamic Watermarks/Text Overlay on Images in PHP" height="90" width="90" onmouseover="onover('Dynamic Watermarks/Text Overlay on Images in PHP')" onmouseout="onout()" /></a></div>

	</div>

]]></content:encoded>
			<wfw:commentRss>http://www.snipe.net/2009/10/mini-site-facebook-static-fbml/feed/</wfw:commentRss>
		<slash:comments>407</slash:comments>
		</item>
		<item>
		<title>Writing Your First Twitter Application with OAuth</title>
		<link>http://www.snipe.net/2009/07/writing-your-first-twitter-application-with-oauth/</link>
		<comments>http://www.snipe.net/2009/07/writing-your-first-twitter-application-with-oauth/#comments</comments>
		<pubDate>Thu, 23 Jul 2009 23:26:12 +0000</pubDate>
		<dc:creator>snipe</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[PHP/mySQL]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[application development]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[twitter]]></category>

		<guid isPermaLink="false">http://www.snipe.net/?p=2070</guid>
		<description><![CDATA[If you&#8217;re interested in writing a web-based Twitter application but aren&#8217;t sure where to start, the Twitter OAuth library from Abraham Wiliams makes authenticating with OAuth and Twitter a breeze. Please note: Use of the information in this article is conditional on the fact that you swear NOT to to make any of those goddamned [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re interested in writing a web-based Twitter application but aren&#8217;t sure where to start, the <a href="http://twitter.abrah.am/" target="_blank">Twitter OAuth library from Abraham Wiliams</a> makes authenticating with OAuth and Twitter a breeze.<br />
<span id="more-2070"></span><br />
<strong>Please note: </strong>Use of the information in this article is conditional on the fact that you swear NOT to to make any of those goddamned Twitter games that spam Twitter timelines or send DMs like Spymaster or Quizzes. If you&#8217;re reading this to learn how to create one of those, please fuck right off. Do not pass go, do not collect $200. Those apps are the anal cancer of Twitter and the people who write them should be clubbed like baby seals.</p>
<p>Right then. Moving on.</p>
<p><a href="http://oauth.net/" target="_blank">OAuth</a> is an open protocol to allow secure API authorization  in a simple and standard method from desktop and web applications. In layman&#8217;s terms, it is a system by which you can allow a user to authenticate with an OAuth-enabled service without providing you with their credentials to that service.</p>
<p>In my Twitter anti-social media douchebag service, <a href="http://www.douchenuker.com" target="_blank">DoucheNuker.Com</a>, we use Twitter&#8217;s OAuth to validate the user and make Twitter API requests on their behalf, specifically sending a DM to the douchebag they are nuking, another DM to @spam to report them to Twitter as a spammer, and then a block request to block the spammer&#8217;s account from being able to follow them in the future.</p>
<h3>Why OAuth?</h3>
<p>Using OAuth allows you to write applications that access the Twitter API but do not require your users to give you their Twitter username and password. This is important for a variety of reasons:</p>
<ul>
<li>If the user changes their Twitter login, they do not have to update that information with you for your application to continue working for them</li>
<li>Using OAuth puts the user in control &#8211; if they ever wish to stop using your application, they can <a href="https://twitter.com/account/connections" target="_blank">disable it through Twitter</a> instead of trusting your application to stop using their login information. Once they disable it through Twitter, any requests by your application will require them to manually approve the connection again.</li>
<li>Increased sense of trust, since the user doesn&#8217;t have to worry about your application stealing their Twitter credentials and using it for nefarious purposes. I personally wouldn&#8217;t trust any web-based application that asks for my Twitter username and password, and given <a href="http://mashable.com/2009/07/15/twitter-security-meltdown/" target="_blank">Twitter&#8217;s recent history of bad press regarding their security</a>, more and more users are following that lead.</li>
</ul>
<h3>Definitions</h3>
<p style="text-align: left;">Before I show you how to use Abraham&#8217;s shmancy library to connect to Twitter&#8217;s OAuth, you should understand the basics of how OAuth works and what it&#8217;s doing. And before we get too caught up in <em>that</em>, it&#8217;s important that we establish some definitions that you&#8217;ll see if you do any additional research into OAuth:</p>
<p style="text-align: left;"><img class="aligncenter size-full wp-image-2084" title="chartkey-2" src="http://www.snipe.net/wp-content/uploads/2009/07/chartkey-2.png" alt="chartkey-2" width="464" height="110" /></p>
<p style="text-align: left;">
<p><strong>User:</strong> The users of your application.<br />
<strong>Consumer:</strong> Your application, which you have registered with Twitter<br />
<strong>Service Provider: </strong>The third-party service the <em>consumer</em> (your application) is authenticating against &#8211; in this case, Twitter.</p>
<p>These terms are used in much of the OAuth documentation, so they&#8217;re worth remembering.</p>
<p>So now that you know the lingo, how does OAuth actually work? For a detailed technical view of what gets passed back and forth, check out the <a href="http://oauth.googlecode.com/svn/spec/branches/1.0/drafts/4/spec.html" target="_blank">core spec documentation on OAuth</a>. Included in that documentation is the detailed chart below.</p>
<p><img class="aligncenter size-large wp-image-2088" title="diagram" src="http://www.snipe.net/wp-content/uploads/2009/07/diagram-560x411.png" alt="diagram" width="560" height="411" /></p>
<p>As you can see, the documentation frequently uses the terms defined above.</p>
<p>If that flow diagram seems a little overwhelming, don&#8217;t sweat it. I have a simplified version just for you (featuring a stoner Twitter user and a Twitter bird with a Thyroid problem), specifically with respect to the bits you need to know to set up your first Twitter application with OAuth. The other things OAuth does <em>are</em> important, but this is the stuff that directly impacts you, and that you need to grok to get started with your app.</p>
<p><img class="aligncenter size-full wp-image-2086" title="chart" src="http://www.snipe.net/wp-content/uploads/2009/07/chart.png" alt="chart" width="550" height="435" /></p>
<p><img class="alignleft size-full wp-image-2090" title="boba_fett" src="http://www.snipe.net/wp-content/uploads/2009/07/boba_fett.png" alt="boba_fett" width="128" height="128" />I was absurdly and inexplicably tempted to randomly throw a Boba Fett icon into that diagram, but was afraid it might confuse people. That said, I have poor impulse control, so here&#8217;s a random Boba Fett icon, so I can sleep tonight. As my friend <a href="http://twitter.com/jramboz" target="_blank">Jason Ramboz</a> says, &#8220;Step 4, Boba Fett freezes the key in carbonite for transport.&#8221;</p>
<p>Moving on.</p>
<p>Now that you&#8217;ve got a good idea of how the basics of OAuth work, you&#8217;re ready to get started with Abraham&#8217;s great Twitter OAuth library. He does provide an example script in the downloadable code, but it might be confusing for people just starting out.</p>
<h3>Getting Started &#8211; Registering Your Application with Twitter</h3>
<p>Before you even start mucking around in any code, you have to <strong><a href="https://twitter.com/oauth_clients/new" target="_blank">register your new application with Twitter</a></strong>. You&#8217;ll need a name and url for your application in order to register it, and you&#8217;ll need to define a callback url. The callback url is the full url of the page Twitter should send the user to after it&#8217;s done authenticating. This file can be named anything you want, but make sure the one you create on your server matches the one you register with Twitter. All of these details can be changed later if you change your mind or need to update something.</p>
<p>Once you&#8217;ve registered your application, Twitter will issue you a <strong>Consumer Key</strong> and a <strong>Consumer Secret</strong> for your new app. You&#8217;ll need these to get your sample code from the Twitter OAuth library working. As you can probably tell by the name, your Consumer Secret should remain private and you should never give it out to anyone. It&#8217;s used in your code so that Twitter can identify your application when you&#8217;re making API calls.</p>
<p>By forcing you to send your consumer key and secret with your API calls, Twitter is able to determine which application is sending the API calls, and can verify that the Twitter user you are attempting to send API requests on behalf of has actually authorized your application to access their account. If the user decides they no longer want to allow your application, they can edit their allowed application preferences and your application will no longer be able to make API calls on their behalf.</p>
<p>You can access a list of all of the applications you have registered with Twitter &#8211; and links to edit their details or view the consumer key and consumer secret &#8211; by going to <a href="https://twitter.com/oauth_clients/" target="_blank">your oauth clients page on Twitter</a>.</p>
<h4>The Twitter OAuth PHP Library Code</h4>
<p><strong>You&#8217;ve got your consumer keys from Twitter, so now you&#8217;re ready to download <a href="https://docs.google.com/View?docID=dcf2dzzs_2339fzbfsf4" target="_blank">Abraham&#8217;s Twitter OAuth library</a> code. </strong>You can pull the code from <a href="http://github.com/abraham/twitteroauth" target="_blank">http://github.com/abraham/twitteroauth</a>. As I mentioned, he does provide an example script, but there&#8217;s not a lot of explanation given to it, so some people might be a little confused by it if its their first foray into Twitter applications with OAuth. We&#8217;re going to whip up something a little more straightforward and simple, so you can easily modify it to suit your needs.</p>
<p>Unpack/unzip the archive you downloaded from github. You&#8217;ll see the two main files, OAuth.php and twitterOAuth.php are in the top level directory, and there is a directory called &#8216;example&#8217;, that has the included example script.</p>
<p><strong>For our example, we&#8217;re going to put the two OAuth files into a directory called &#8216;twitterOAuth&#8217;, which is a sub-directory of where the index.php and callback.php files live. </strong>As you may have guessed, the callback.php file is the one we&#8217;ve registered with Twitter as being our callback url. We&#8217;ll keep common configuration options such as the consumer key and consumer secret, and database credentials in a config.php file.</p>
<p>[source lang='php']/* config.php */</p>
<p>/* Consumer key from twitter */<br />
$consumer_key = &#8216;xxhjgxhjxhhjgxjhjxgjyx768678xx&#8217;; </p>
<p>/* Consumer Secret from twitter */<br />
$consumer_secret = &#8216;jhgjdfgfgjhj76jgjgjhxxxjhxxx&#8217;;<br />
[/source]</p>
<p>Now we create the index.php file, which will be used to generate the authentication link, inviting users to authorize and login using Twitter.</p>
<p>[source lang='php']/* index.php */</p>
<p>session_start();</p>
<p>/* Destroy the session if the user is logging out */<br />
if ((isset($_GET['logout'])) &#038;&#038; ($_GET['logout']==&#8217;true&#8217;)) {<br />
    session_destroy();<br />
    session_unset();<br />
}</p>
<p>/* Include the config file */<br />
require_once(&#8216;config.php&#8217;);</p>
<p>/* include the twitter OAuth library files */<br />
require_once(&#8216;twitterOAuth/twitterOAuth.php&#8217;);<br />
require_once(&#8216;twitterOAuth/OAuth.php&#8217;);</p>
<p>    /*<br />
    Create a new TwitterOAuth object, and then<br />
    get a request token. The request token will be used<br />
    to build the link the user will use to authorize the<br />
    application. </p>
<p>     You should probably use a try/catch here to handle errors gracefully<br />
    */<br />
    $to = new TwitterOAuth($consumer_key, $consumer_secret);<br />
    $tok = $to->getRequestToken();</p>
<p>    $request_link = $to->getAuthorizeURL($tok);</p>
<p>    /*<br />
    Save tokens for later  &#8211; we need these on the callback page to ask for the<br />
    access tokens<br />
    */<br />
    $_SESSION['oauth_request_token'] = $token = $tok['oauth_token'];<br />
    $_SESSION['oauth_request_token_secret'] = $tok['oauth_token_secret'];</p>
<p>echo &#8216;
<p><a href="'.$request_link.'">login using twitter</a> | &#8216;;<br />
echo &#8216;<a href="index.php?logout=true">Logout</a></p>
<p>&#8216;;<br />
[/source]</p>
<p>The callback.php file is the script that Twitter sends the user back to after authenticating. Here you&#8217;ll probably want to set some cookies, store some user data in the database, and start letting the user do whatever it is your application does.</p>
<p>[source lang='php']/* callback.php */</p>
<p>session_start();</p>
<p>/* Include the config file */<br />
require_once(&#8216;config.php&#8217;);</p>
<p>/* include the twitter OAuth library files */<br />
require_once(&#8216;twitterOAuth/twitterOAuth.php&#8217;);<br />
require_once(&#8216;twitterOAuth/OAuth.php&#8217;);</p>
<p>/* check for an auth access token. If there&#8217;s no auth token set, go ahead and fetch one from Twitter,<br />
* using the API call. */<br />
if ((!isset($_SESSION['oauth_access_token'])) || ($_SESSION['oauth_access_token'])==&#8221;) {</p>
<p>	$to = new TwitterOAuth($consumer_key, $consumer_secret, $_SESSION['oauth_request_token'], $_SESSION['oauth_request_token_secret']);<br />
	$tok = $to->getAccessToken();</p>
<p> 	/* Save tokens for later  &#8211; might be wise to<br />
        * store the oauth_token and secret in a database, and<br />
        * only store the oauth_token in a cookie or session for security purposes */<br />
	$_SESSION['oauth_access_token'] = $token = $tok['oauth_token'];<br />
	$_SESSION['oauth_access_token_secret'] = $tok['oauth_token_secret'];</p>
<p>} </p>
<p>/* Connect to the Twitter API */<br />
$to = new TwitterOAuth($consumer_key, $consumer_secret, $_SESSION['oauth_access_token'], $_SESSION['oauth_access_token_secret']);<br />
$content = $to->OAuthRequest(&#8216;https://twitter.com/account/verify_credentials.xml&#8217;, array(), &#8216;GET&#8217;);<br />
$user = simplexml_load_string($content);</p>
<p>if ($user->screen_name!=&#8221;) {<br />
	echo &#8216;<br />
<h2><img src="'.$user-/>profile_image_url.&#8217;&#8221; align=&#8221;left&#8221;>&#8217;;<br />
	echo &#8216;Hello, &#8216;.$user->screen_name.&#8217;</h2>
<p>&#8216;;<br />
	echo &#8216;
<p>You follow &#8216;.$user->friends_count.&#8217; people, &#8216;;<br />
	echo &#8216;you have &#8216;.$user->followers_count.&#8217; &#8216;;<br />
	echo &#8216;people following you, and you joined &#8216;;<br />
	echo &#8216;Twitter on &#8216;.$user->created_at.&#8217;. &#8216;;<br />
	echo &#8216;You have posted &#8216;.$user->statuses_count.&#8217; updates.</p>
<p>&#8216;;<br />
} else {<br />
	echo &#8216;Oops &#8211; an error has occurred.&#8217;;<br />
}</p>
<p>echo &#8216;
<pre>';
print_r($user);
echo '</pre>
<p>&#8216;;[/source]</p>
<p><strong>So we&#8217;ve connected to Twitter&#8217;s API to authenticate a session on behalf of the user, and then put the XML response of the user&#8217;s information into an array called $user, using <a href="http://us3.php.net/simplexml">SimpleXML</a>.</strong> Using SimpleXML, we can call up any node values within the XML using $user->field_name, as you can see above. </p>
<p>I&#8217;ve included a print_r($user) so that you can see the full details of the array being returned, but you&#8217;ll obviously want to comment that out in your live code.</p>
<p>The output array will contain the following fields:</p>
<p>[source lang='html']SimpleXMLElement Object<br />
(<br />
    [id] => 14246782<br />
    [name] => snipe<br />
    [screen_name] => snipeyhead<br />
    [location] => New York<br />
    [description] => Codemonkey, designer, author, speaker, blogger, swordfighter, Warcrafter, sarcasticgeek, scuba diver, blacksmith, crimefighter, Mentat, MBTI: ENTP, Totally NSFW<br />
    [profile_image_url] => http://s3.amazonaws.com/twitter_production/profile_images/303658881/Photo_4-rcrop2_normal.jpg<br />
    [url] => http://www.snipe.net<br />
    [protected] => false<br />
    [followers_count] => 4224<br />
    [profile_background_color] => 340100<br />
    [profile_text_color] => 3C3940<br />
    [profile_link_color] => 6C2125<br />
    [profile_sidebar_fill_color] => AEA797<br />
    [profile_sidebar_border_color] => 943A39<br />
    [friends_count] => 3756<br />
    [created_at] => Fri Mar 28 20:37:35 +0000 2008<br />
    [favourites_count] => 314<br />
    [utc_offset] => 12600<br />
    [time_zone] => Tehran<br />
    [profile_background_image_url] => http://s3.amazonaws.com/twitter_production/profile_background_images/22127710/twitterback2.jpg<br />
    [profile_background_tile] => false<br />
    [statuses_count] => 20570<br />
    [notifications] => false<br />
    [verified] => false<br />
    [following] => false<br />
    [status] => SimpleXMLElement Object<br />
        (<br />
            [created_at] => Mon Jul 27 01:50:36 +0000 2009<br />
            [id] => 2862508774<br />
            [text] => @elazar In case a name gets blocked/banned &#8211; when its reinstated (by someone claiming it, not spamming), it has a new ID#<br />
            [source] => Tweetie<br />
            [truncated] => false<br />
            [in_reply_to_status_id] => 2860170987<br />
            [in_reply_to_user_id] => 9105122<br />
            [favorited] => false<br />
            [in_reply_to_screen_name] => elazar<br />
        )</p>
<p>)[/source]</p>
<p>We&#8217;re not actually doing anything magical here yet, since that information is all available publicly via a user&#8217;s RSS feed, but the key line of code you want to look at in callback.php is this one:</p>
<p>[source lang='php']$content = $to->OAuthRequest(&#8216;https://twitter.com/account/verify_credentials.xml&#8217;, array(), &#8216;GET&#8217;);[/source]</p>
<p>The OAuthRequest function is what actually sends the requests to the API, so you&#8217;ll be using this a lot. In the example above, all we were doing was getting the access tokens, but you&#8217;ll use OAuthRequest for just about everything else, too. For example, to send a Direct Message in Twitter, you&#8217;d use:</p>
<p>[source lang='php']<br />
$params = array(&#8216;user&#8217; => &#8216;username&#8217;, &#8216;text&#8217; => &#8216;this is a test message&#8217;);<br />
$do_dm = simplexml_load_string($to->OAuthRequest(&#8216;http://twitter.com/direct_messages/new.xml&#8217;, $params, &#8216;POST&#8217;));[/source]</p>
<p>To block a user, you&#8217;d do:</p>
<p>[source lang='php']$doblock = simplexml_load_string($to->OAuthRequest(&#8216;http://twitter.com/blocks/create/username.xml&#8217;, array(), &#8216;POST&#8217;));[/source]</p>
<p>To send a status update:<br />
[source lang='php']$content = simplexml_load_string($to->OAuthRequest(&#8216;https://twitter.com/statuses/update.xml&#8217;, array(&#8216;status&#8217; => &#8216;Test OAuth update. #testoauth&#8217;), &#8216;POST&#8217;));[/source]</p>
<h3>Important! Storing user IDs</h3>
<p>Whenever you&#8217;re storing Twitter IDs in a database, be sure to store the Twitter ID number <em>in addition</em> to (or instead of) the Twitter username. While it may seem obvious to use a numeric value over a mixed alphanumeric, Twitter doesn&#8217;t expose user&#8217;s ID numbers without a little digging, so it might be easy to forget that they exist.</p>
<p>There are two main reasons why using the numeric ID is critical:</p>
<ul>
<li>Users can change their Twitter usernames. If they did this, your entire database could potentially be screwed up, since username key you&#8217;re looking for won&#8217;t match any longer.</li>
<li>If an account has been suspended due to spam or imposters, it can potentially be available for registration again after a grace period. If a spammer had a username before, and then a legitimate user reclaimed it, your records could potentially have old data from the previous user&#8217;s account. </li>
</ul>
<p>The second point above became crystal clear while working on DoucheNuker.Com. If a user account was suspended due to spamming, and then a legitimate user took it over, that new, legitimate user could potentially be considered a spammer in our database if we didn&#8217;t store (and query against) the ID number, too. When a username is reissued or reclaimed, it gets a new user ID number, so as long as you store and use the Twitter user&#8217;s ID number, your database can remain agnostic to name changes and reissues. </p>
<p>You&#8217;ll note in the <a href="http://apiwiki.twitter.com/Twitter-API-Documentation" target="_blank">Twitter REST API documentation</a> that almost all API requests allow the option of using the username or the user ID, and some actually require the user ID and cannot be used with just a username.</p>
<h3>Important! Error Messages and Throttling</h3>
<p><strong>You do not want to authenticate against Twitter every single time you load the page, but will instead want to store the request tokens in a database or session so that you don&#8217;t keep hammering Twitter&#8217;s API each time the page loads.</strong> </p>
<p>Remember that the although the <strong>Request Token</strong> you used to generate the authorization link will change often, a user&#8217;s <strong>Access Token </strong>and<strong> Access Secret Token</strong> do not, so you can safely store those in a database and use those instead of re-validating every time.</p>
<p><strong>As of right now, Twitter is throttling validation requests to 15 <em>per Twitter account</em> per hour.</strong> This was implemented to improve Twitter&#8217;s security and make it harder for bad guys to brute force their way into someone else&#8217;s Twitter account. There is discussion about rolling this change back, or only throttling to 15 <em>failed attempts</em> per hour, but as of this moment, if you attempt to authenticate more than 15 times in an hour, you&#8217;ll get a message that says &#8220;Too many requests in this time period. Try again later.&#8221; There is no way around this message for now, so plan your application accordingly. </p>
<p><strong>This limit is entirely separate from the <a href="http://apiwiki.twitter.com/Rate-limiting">Twitter Rate Limit</a> that throttles the number of times you can hit the API.</strong> <a href="http://twitter.com/help/request_whitelisting">Whitelisting your account and IP address with Twitter</a> will NOT circumvent this rate limit, so make sure you design your app in a smart way that will not attempt to authenticate more than absolutely necessary.</p>
<p>The default rate limit for calls to the REST API is 150 requests per hour. The REST API does account- and IP-based rate limiting. Authenticated API calls are charged to the authenticating user&#8217;s limit while unauthenticated API calls are deducted from the calling IP address&#8217; allotment. </p>
<p><strong>You&#8217;ll notice in all of API requests, we&#8217;re using SimpleXML to capture the value of the XML that&#8217;s returned. </strong>We need to do this in order to make sure we&#8217;re capturing any error messages that Twitter returns to us. Without error messages, when stuff doesn&#8217;t work as expected, we&#8217;re flying completely blind. Always make sure to plan your application in a way that handles errors intelligently. Let&#8217;s take a look at the API call to send a Direct Message again:</p>
<p>[source lang='php']$params = array(&#8216;user&#8217; => &#8216;username&#8217;, &#8216;text&#8217; => &#8216;this is a test message&#8217;);<br />
$do_dm = simplexml_load_string($to->OAuthRequest(&#8216;http://twitter.com/direct_messages/new.xml&#8217;, $params, &#8216;POST&#8217;));</p>
<p>/* Check for an error response from Twitter */<br />
if ($do_dm->error!=&#8221;) {<br />
	echo &#8216;<br />
<h2>ERROR: &#8216;.$do_dm->error.&#8217;</h2>
<p>&#8216;;<br />
}[/source]</p>
<p><strong>Now we&#8217;re capturing the error returned from Twitter, and can handle this appropriately with our users. </strong>The error might be indicating that the user cannot send a Direct Message to someone they&#8217;re not following. Or there might be something else amiss &#8211; so you&#8217;ll want to make provisions in your script to help the user understand why something might not be working.</p>
<p><strong>And that&#8217;s honestly all there is to it.</strong> Now that you&#8217;ve got the OAuthRequest function sussed, you just need to check with the <a href="http://twitterapi.pbworks.com/browse/#view=ViewFolder&#038;param=API%20Methods">Twitter API Wiki</a> to determine the correct urls and parameters to send, based on what you&#8217;re trying to do.</p>
<p>I have to say, having worked with a LOT of APIs, including Facebook, Amazon, and at least a half-dozen others, Twitter&#8217;s API is actually the most well-documented and simplest to use. Surprising, really, since Facebook and Amazon have actual business models, so you&#8217;d think they&#8217;d invest just an iota of time into documenting their shit. I&#8217;ve gone into long tirades here on my blog about how miserably awful the Facebook API documentation is, and Amazon&#8217;s API is probably 10x worse. Twitter&#8217;s API is, overall, pretty accurate and up to date. If its your first foray into writing an application with an API, I think Twitter is actually a good place to start &#8211; before you graduate to Facebook and wish you were dead.</p>
<h3>Recap &#8211; Important Links</h3>
<ul>
<li><a href="https://twitter.com/oauth_clients/new" target="_blank">Register your application with Twitter</a></li>
<li><a href="https://twitter.com/oauth_clients/" target="_blank">List of all of your registered apps on Twitter</a></li>
<li><a href="http://apiwiki.twitter.com/Twitter-API-Documentation" target="_blank">Twitter API Documentation</a></li>
<li><a href="http://apiwiki.twitter.com/Rate-limiting" target="_blank">Twitter API Rate Limiting Documentation</a></li>
<li><a href="https://docs.google.com/View?docID=dcf2dzzs_2339fzbfsf4" target="_blank">Download &amp; Docs for Abraham&#8217;s OAuth PHP library</a></li>
<li><a href="http://oauth.net/" target="_blank">OAuth official website</a></li>
</ul>
<p>And that&#8217;s all there is to it. Please use your new powers for good and not evil. No annoying games, no &#8220;increase your followers&#8221; services, etc. If you have any questions, leave &#8216;em in the comments.</p>

 <script type="text/javascript">
	<!--
		function onover(what){
	document.getElementById('blurbtext').innerHTML=''+what+'';
	}
	function onout(){
	document.getElementById('blurbtext').innerHTML='&nbsp;';
	}
	-->
	</script>



<h3 style="padding-bottom: 0px; margin-bottom: 0px;">Also check out: <br /><span id="blurbtext"><br /></span></h3>

<div id="relatedposts">




		
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2008/09/planning-a-facebook-application/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2008/12/n40212040147_6720.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Planning Your Facebook Application" height="90" width="90" onmouseover="onover('Planning Your Facebook Application')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2008/12/planning-a-facebook-application-part-two/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2008/12/n40212040147_6720.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Planning a Facebook Application: Part Two" height="90" width="90" onmouseover="onover('Planning a Facebook Application: Part Two')" onmouseout="onout()" /></a></div>

			
               

        
        
        
		<div class="yarppimg"><a href="http://www.snipe.net/2009/12/twitter-business-contributors/" rel="bookmark">
		<img src="http://www.snipe.net/wp-content/themes/snipe/thumb.php?src=http://www.snipe.net/wp-content/uploads/2009/12/love-twitter.jpg&amp;h=90&amp;w=90&amp;zc=1&amp;q=95" alt="Twitter Gets Down to Business" height="90" width="90" onmouseover="onover('Twitter Gets Down to Business')" onmouseout="onout()" /></a></div>

	</div>

]]></content:encoded>
			<wfw:commentRss>http://www.snipe.net/2009/07/writing-your-first-twitter-application-with-oauth/feed/</wfw:commentRss>
		<slash:comments>201</slash:comments>
		</item>
	</channel>
</rss>

