<?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>blog.elliotjameschong.com</title>
	<atom:link href="http://blog.elliotjameschong.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.elliotjameschong.com</link>
	<description>Learnings and musings of a polyglot developer</description>
	<lastBuildDate>Thu, 11 Apr 2013 17:37:45 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>How to Add Outbound Link Tracking to Tumblr</title>
		<link>http://blog.elliotjameschong.com/2013/04/03/how-to-add-outbound-link-tracking-to-tumblr/</link>
		<comments>http://blog.elliotjameschong.com/2013/04/03/how-to-add-outbound-link-tracking-to-tumblr/#comments</comments>
		<pubDate>Thu, 04 Apr 2013 03:12:35 +0000</pubDate>
		<dc:creator>Elliot Chong</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Tumblr]]></category>

		<guid isPermaLink="false">http://blog.elliotjameschong.com/?p=284</guid>
		<description><![CDATA[<p>I recently started a <a href="http://feed.purpleloot.com" alt="PurpleLoot">Tumblr blog to help gamers find the best prices on their favorite video games</a>, and like any self respecting content publisher I immediately set about adding analytics to the site so that I could track how well my content was converting. I ran into a few snags along the [...]]]></description>
				<content:encoded><![CDATA[<p>I recently started a <a href="http://feed.purpleloot.com" alt="PurpleLoot">Tumblr blog to help gamers find the best prices on their favorite video games</a>, and like any self respecting content publisher I immediately set about adding analytics to the site so that I could track how well my content was converting. I ran into a few snags along the way when adding outbound link tracking with Google Analytics, so hopefully this guide will help save the next blogger some time.</p>
<ol>
<li>
<p>Click the customize link at the top of your blog.</p>
</li>
<li>
<p>Click the &#8216;Edit HTML&#8217; button.</p>
<p><img src="http://blog.elliotjameschong.com/wp-content/uploads/2013/04/tumblr-edit.jpg" alt="Tumblr&#039;s Edit HTML Button" class="aligncenter size-full wp-image-287" /></p>
<p>It should look something like this:</p>
<p><img src="http://blog.elliotjameschong.com/wp-content/uploads/2013/04/tumblr-html.jpg" alt="Tumblr&#039;s HTML Editor" class="aligncenter size-full wp-image-288" /></li>
<li>
<p>Add the below code into your blog&#8217;s HTML:</p>
<p><script src="https://gist.github.com/5307209.js?file=outbound-link-tracking.html"></script><noscript><pre><code class="language-html html">&lt;head&gt;
    
    &lt;!-- Rest of the &lt;head&gt; content here --&gt;
    
    &lt;!-- Include jQuery --&gt;
    &lt;script src=&quot;//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;

    &lt;!-- Rest of the &lt;body&gt; content here --&gt;
    
    &lt;script&gt;
        // Load Google Analytics
        (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
        (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
        m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
        })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
        
        // Send a pageview event for your domain / GA account
        ga('create', 'UA-XXXXXXXX-X', 'example.com');
        ga('send', 'pageview');
    
        // Listen for clicks from outbound links
        jQuery(&quot;a[href*='http://']:not([href*='&quot; + window.location.hostname + &quot;'])&quot;).click(function(e) {
        
            // Send a click event with the href as the label
            try
            {
                ga('send', 'event', 'Outbound Link', 'click', jQuery(this).attr('href'));
            }
            catch (err)
            {}
            
            // Delay the page's loading for 100 milliseconds to allow Google time to send the click event
            setTimeout('document.location = &quot;' + jQuery(this).attr('href') + '&quot;', 100);
            
            // Prevent the page from loading
            e.preventDefault();
        });
    &lt;/script&gt;
&lt;/body&gt;</code></pre></noscript></li>
</ol>
<p>Don&#8217;t forget to swap in your domain and GA account id in the script block before the end of the body.</p>
<p>It&#8217;s also worth noting that the above code should work fine for adding outbound link tracking to Google Analytics on any website. Hope this was helpful, and happy Tumbling!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elliotjameschong.com/2013/04/03/how-to-add-outbound-link-tracking-to-tumblr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Underscore.js Deep Clone and Deep Extend Mix Ins</title>
		<link>http://blog.elliotjameschong.com/2012/10/10/underscore-js-deepclone-and-deepextend-mix-ins/</link>
		<comments>http://blog.elliotjameschong.com/2012/10/10/underscore-js-deepclone-and-deepextend-mix-ins/#comments</comments>
		<pubDate>Wed, 10 Oct 2012 18:54:23 +0000</pubDate>
		<dc:creator>Elliot Chong</dc:creator>
				<category><![CDATA[CoffeeScript]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.elliotjameschong.com/?p=267</guid>
		<description><![CDATA[<p>When combining and recomposing JavaScript objects the <a href="http://underscorejs.org/#extend">Underscore extend method</a> is an invaluable tool. Essentially, it copies all of the extended object&#8217;s properties onto the originating object. This works great for simple objects that only contain Numbers and Strings; however, once you introduce nested Arrays or Objects with conflicting property names you&#8217;ll quickly find [...]]]></description>
				<content:encoded><![CDATA[<p>When combining and recomposing JavaScript objects the <a href="http://underscorejs.org/#extend">Underscore extend method</a> is an invaluable tool. Essentially, it copies all of the extended object&#8217;s properties onto the originating object. This works great for simple objects that only contain Numbers and Strings; however, once you introduce nested Arrays or Objects with conflicting property names you&#8217;ll quickly find that properties you&#8217;d ideally like to recursively combine are actually just being overwritten.</p>
<p>This behavior starts to breakdown when you&#8217;re looking to combine nested objects, such as when I was recently working with <a href="http://developers.facebook.com/docs/reference/api/field_expansion/">Facebook&#8217;s Graph API Field Expansions</a>.</p>
<p>Example use case below:</p>
<script src="https://gist.github.com/3861963.js?file=underscore.mixin.deepExtend.useCase.js"></script><noscript><pre><code class="language-javascript javascript">var user = { &quot;name&quot;: { &quot;first&quot;: &quot;Earl&quot; }, &quot;friends&quot;: [&quot;0&quot;,&quot;1&quot;,&quot;3&quot;], &quot;job&quot;: &quot;Mad Scientist&quot;, &quot;pets&quot;: { &quot;dog&quot;: &quot;Ralph&quot; } };
var userUpdate = { &quot;name&quot;: { &quot;last&quot;: &quot;Duncan&quot; }, &quot;friends&quot;: [&quot;6&quot;,&quot;9&quot;], &quot;job&quot;: &quot;Happy Scientist&quot;, &quot;pets&quot;: { &quot;cat&quot;: &quot;Judy&quot; }, &quot;city&quot;: &quot;Portlandia&quot; };

_.extend(user, userUpdate);

// results in user equalling:
// { &quot;name&quot;: { &quot;last&quot;: &quot;Duncan&quot; }, &quot;friends&quot;: [&quot;6&quot;,&quot;9&quot;], &quot;job&quot;: &quot;Happy Scientist&quot;, &quot;pets&quot;: { &quot;cat&quot;: &quot;Judy&quot; }, &quot;city&quot;: &quot;Portlandia&quot; }</code></pre></noscript>
<p>To help solve this I&#8217;ve created an <a href="https://gist.github.com/3861963">Underscore deep extend mixin</a>, usage below:</p>
<script src="https://gist.github.com/3861963.js?file=underscore.mixin.deepExtend.usage.js"></script><noscript><pre><code class="language-javascript javascript">var user = { &quot;name&quot;: { &quot;first&quot;: &quot;Earl&quot; }, &quot;friends&quot;: [&quot;0&quot;,&quot;1&quot;,&quot;3&quot;], &quot;job&quot;: &quot;Mad Scientist&quot;, &quot;pets&quot;: { &quot;dog&quot;: &quot;Ralph&quot; } };
var userUpdate = { &quot;name&quot;: { &quot;last&quot;: &quot;Duncan&quot; }, &quot;friends&quot;: [&quot;6&quot;,&quot;9&quot;], &quot;job&quot;: &quot;Happy Scientist&quot;, &quot;pets&quot;: { &quot;cat&quot;: &quot;Judy&quot; }, &quot;city&quot;: &quot;Portlandia&quot; };

_.deepExtend(user, userUpdate);

// results in user equalling:
// { &quot;name&quot;: { &quot;first&quot;: &quot;Earl&quot;, &quot;last&quot;: &quot;Duncan&quot; }, &quot;friends&quot;: [&quot;0&quot;,&quot;1&quot;,&quot;3&quot;,&quot;6&quot;,&quot;9&quot;], &quot;job&quot;: &quot;Happy Scientist&quot;, &quot;pets&quot;: { &quot;dog&quot;: &quot;Ralph&quot;, &quot;cat&quot;: &quot;Judy&quot; }, &quot;city&quot;: &quot;Portlandia&quot; }</code></pre></noscript>
<p>Feel free to download the CoffeeScript source, tests, and compiled JavaScript for Underscore deep clone and deep extend <a href="https://gist.github.com/3861963">here</a>.</p>
<p><b><i>Update:</i></b> If you&#8217;re looking for a quick and easy deep clone mixin for JSON-compatible datatypes (i.e.: no Date support) try <code>_.mixin({ deepClone: function (p_object) { return JSON.parse(JSON.stringify(p_object)); } });</code></p>
<p><b><i>Update:</i></b> The excellent <a href="http://lodash.com/">Lo-Dash</a> library, an Underscore drop-in replacement that boasts speed improvements and an enhanced feature set, has released its own <a href="http://lodash.com/docs#clone">deep clone</a> and <a href="http://lodash.com/docs#merge">deep extend (aka: merge)</a> methods. Certainly worth checking out!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elliotjameschong.com/2012/10/10/underscore-js-deepclone-and-deepextend-mix-ins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Facebook Social Plugins with AngularJS</title>
		<link>http://blog.elliotjameschong.com/2012/10/09/angular-js-facebook-plugins/</link>
		<comments>http://blog.elliotjameschong.com/2012/10/09/angular-js-facebook-plugins/#comments</comments>
		<pubDate>Wed, 10 Oct 2012 00:48:05 +0000</pubDate>
		<dc:creator>Elliot Chong</dc:creator>
				<category><![CDATA[AngularJS]]></category>
		<category><![CDATA[CoffeeScript]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://blog.elliotjameschong.com/?p=246</guid>
		<description><![CDATA[<p>I&#8217;ve been diving into <a href="http://angularjs.org">AngularJS</a> lately and came across a use-case where my <a href="http://developers.facebook.com/docs/plugins/">Facebook Social Plugin</a>-containing Angular templates were being rendered after the Facebook SDK&#8217;s init and parse method had already been called. Sad faces ensued as my Facebook Social Plugins were no where to be found in the rendered template. To work [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been diving into <a href="http://angularjs.org">AngularJS</a> lately and came across a use-case where my <a href="http://developers.facebook.com/docs/plugins/">Facebook Social Plugin</a>-containing Angular templates were being rendered after the Facebook SDK&#8217;s init and parse method had already been called. Sad faces ensued as my Facebook Social Plugins were no where to be found in the rendered template. To work around this I&#8217;ve created a set of directives that will automatically parse Facebook plugins as they&#8217;re rendered by Angular.</p>
<script src="https://gist.github.com/3856847.js?file=facebookPluginDirectives.coffee"></script><noscript><pre><code class="language-coffeescript coffeescript">module = angular.module 'FacebookPluginDirectives', []

createDirective = (name) -&gt;
	module.directive name, -&gt;
		restrict: 'C'
		link: (scope, element, attributes) -&gt;
			FB?.XFBML.parse(element.parent()[0])

createDirective pluginName for pluginName in ['fbActivity', 'fbComments', 'fbFacepile', 'fbLike', 'fbLikeBox', 'fbLiveStream', 'fbLoginButton', 'fbName', 'fbProfilePic', 'fbRecommendations']</code></pre></noscript>
<p>Feel free to download the compiled JavaScript <a href="https://gist.github.com/3856847">here</a>.</p>
<p><em>Caveat: The above code snippet only works for plugins instantiated using the HTML5 class-based method.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elliotjameschong.com/2012/10/09/angular-js-facebook-plugins/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adobe AIR for iOS Development Gotchas</title>
		<link>http://blog.elliotjameschong.com/2011/12/28/adobe-air-3-ios-gotchas/</link>
		<comments>http://blog.elliotjameschong.com/2011/12/28/adobe-air-3-ios-gotchas/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 07:48:15 +0000</pubDate>
		<dc:creator>Elliot Chong</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[iOS]]></category>

		<guid isPermaLink="false">http://blog.elliotjameschong.com/?p=204</guid>
		<description><![CDATA[<p>Lately I&#8217;ve been diving into iOS game development using Adobe AIR 3.1 and have been really impressed by its overall performance and how easy it has been to get a game up and running. However, it hasn&#8217;t always been smooth sailing and I&#8217;ve run into a fair number of gotchas that I wanted to document [...]]]></description>
				<content:encoded><![CDATA[            <script type="text/javascript" src="http://blog.elliotjameschong.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushJava.js"></script>
<p>Lately I&#8217;ve been diving into iOS game development using Adobe AIR 3.1 and have been really impressed by its overall performance and how easy it has been to get a game up and running. However, it hasn&#8217;t always been smooth sailing and I&#8217;ve run into a fair number of gotchas that I wanted to document in the hopes that it will help others troubleshoot Adobe AIR for iOS development. Happy coding!</p>
<h3>Video Playback in Adobe AIR 3</h3>
<p><a href="http://blog.elliotjameschong.com/2011/10/16/air-ios-video/">http://blog.elliotjameschong.com/2011/10/16/air-ios-video/</a></p>
<h3>Stage Dimensions Are Inaccurate during Initialization</h3>
<p>Wait a few frames before initializing your application so that Stage has a chance to obtain the correct stageWidth and stageHeight properties.</p>
<p><pre class="brush: java">protected var _waitFrames : int = 10;

// In constructor:
this.addEventListener(Event.ENTER_FRAME, initialize, false, 0, true);

protected function initialize(p_event:Event) : void
{
	if (_waitFrames &gt; 0)
	{
		_waitFrames--;
		return;
	}

	this.removeEventListener(Event.ENTER_FRAME, initialize);

	// Application initialization goes here
}</pre></p>
<p>Or detect the proper Stage dimensions with:</p>
<p><code>var width : Number = this.stage.stageWidth > this.stage.fullScreenWidth ? this.stage.fullScreenWidth : this.stage.stageWidth;</code></p>
<h3>TouchEvents Must Be Enabled</h3>
<p>To use TouchEvents you must define an inputMode, such as <code>Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;</code>, in your application&#8217;s constructor.</p>
<h3>Check for Device Capabilities</h3>
<p>Handling TouchEvents or MouseEvents based on device capabilities:</p>
<p><pre class="brush: java">if (Multitouch.supportsTouchEvents)
{
	this.stage.addEventListener(TouchEvent.TOUCH_BEGIN, onTouch, false, 0, true);
	this.stage.addEventListener(TouchEvent.TOUCH_MOVE, onTouch, false, 0 ,true);
}
else
{
	this.stage.addEventListener(MouseEvent.MOUSE_MOVE, onMove, false, 0, true);
}</pre></p>
<h3>No TouchEvent Sizes</h3>
<p>There is no way to obtain a user&#8217;s finger size on iOS, a TouchEvent&#8217;s sizeY and sizeX properties will always be 1.</p>
<h3>Beware stageX / stageY for MouseEvent.MOUSE_MOVE</h3>
<p>MouseEvent.MOUSE_MOVE will report incorrect stageX and stageY values when you release your finger on a Touch enabled device.</p>
<p>To account for this:</p>
<p><pre class="brush: java">function onMouseMove(p_event:MouseEvent) : void
{
	if (p_event.stageX &gt; this.stage.fullScreenWidth || p_event.stageY &gt; this.stage.fullScreenHeight || p_event.stageX &lt; 0 || p_event.stageY &lt; 0)
	{
		return;
	}
}</pre></p>
<h3>App Switching</h3>
<p>Respond to Stage Event.DEACTIVATE / Event.ACTIVATE events for when an application loses and gains focus.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elliotjameschong.com/2011/12/28/adobe-air-3-ios-gotchas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe AIR for iOS Video Playback</title>
		<link>http://blog.elliotjameschong.com/2011/10/16/air-ios-video/</link>
		<comments>http://blog.elliotjameschong.com/2011/10/16/air-ios-video/#comments</comments>
		<pubDate>Sun, 16 Oct 2011 06:26:17 +0000</pubDate>
		<dc:creator>Elliot Chong</dc:creator>
				<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[iOS]]></category>

		<guid isPermaLink="false">http://blog.elliotjameschong.com/?p=197</guid>
		<description><![CDATA[<p>Adobe&#8217;s latest release of AIR (version 3) finally brings StageVideo to iOS AIR applications. Sadly, getting StageVideo to work properly within AIR was not exactly plug and play and took several hours before finally getting it to work. I&#8217;ve jotted down a few notes on the final solution, hopefully this post will help to save [...]]]></description>
				<content:encoded><![CDATA[            <script type="text/javascript" src="http://blog.elliotjameschong.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushJava.js"></script>
<p>Adobe&#8217;s latest release of AIR (version 3) finally brings StageVideo to iOS AIR applications. Sadly, getting StageVideo to work properly within AIR was not exactly plug and play and took several hours before finally getting it to work. I&#8217;ve jotted down a few notes on the final solution, hopefully this post will help to save the next developer some frustration.</p>
<p><!-- Old Method: StageWebViewBridge http://sonnati.wordpress.com/2011/04/26/air-2-6-for-ios-and-video-playback/ --></p>
<p>Settings for Adobe Media Encoder:</p>
<ul>
<li>MP4 format is required.</li>
<li>Codec: MainConcept H.264 Video</li>
<li>TV Standard: NTSC</li>
<li>Profile: Baseline</li>
<li>Level: 3.1</li>
<li>Bitrate Encoding: CBR</li>
<li>Bitrate: 1.1</li>
</ul>
<p>The <renderMode> property in the app configuration XML must be set to &#8216;direct&#8217; or &#8216;gpu&#8217;.</p>
<p>In additional compiler arguments within Flash Builder, you must be exporting as Flash Player 11 with the parameter &#8216;-swf-version=13&#8242;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elliotjameschong.com/2011/10/16/air-ios-video/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging Facebook Applications for Fun and Profit &#8211; Firefox 4 &amp; Firebug</title>
		<link>http://blog.elliotjameschong.com/2011/04/04/debugging-facebook-applications-for-fun-and-profit-firefox-4-firebug/</link>
		<comments>http://blog.elliotjameschong.com/2011/04/04/debugging-facebook-applications-for-fun-and-profit-firefox-4-firebug/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 18:05:03 +0000</pubDate>
		<dc:creator>Elliot Chong</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[iframe]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://blog.elliotjameschong.com/?p=110</guid>
		<description><![CDATA[<p>Are you Facebook developer and frustrated by your inability to use a JavaScript console to debug your application on Facebook? Good news, with the release of <a href='http://www.mozilla.com/en-US/firefox/new/'>Firefox 4</a> and the latest version of <a href='http://getfirebug.com/'>Firebug</a> (1.7.0)- now you can!</p> <p>To access an iframe Facebook application&#8217;s context enter cd(frames[0]); into your Firebug console. This will [...]]]></description>
				<content:encoded><![CDATA[            <script type="text/javascript" src="http://blog.elliotjameschong.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushJava.js"></script>
<p>Are you Facebook developer and frustrated by your inability to use a JavaScript console to debug your application on Facebook? Good news, with the release of <a href='http://www.mozilla.com/en-US/firefox/new/'>Firefox 4</a> and the latest version of <a href='http://getfirebug.com/'>Firebug</a> (1.7.0)- now you can!</p>
<p>To access an iframe Facebook application&#8217;s context enter <code>cd(frames[0]);</code> into your Firebug console. This will work on both Canvas and Tab applications.</p</p>
<p><i>UPDATE &#8211; 2011/06/13: It appears that Facebook has modified their code. You now have to enter <code>cd(frames[0]);</code>, instead of <code>cd(frames[1]);</code>, to access the appropriate frame within Firebug.</i></p>
<p>By default, command line expressions are relative to the top-level window of the page. The Commandline API for Firebug&#8217;s JavaScript console exposes a &#8216;cd(window)&#8217; method to alter the context of the console to a different window; however, prior to the release of Firefox 4 and Firebug 1.7.0 this functionality was throwing an error citing cross-domain issues. An excellent reason to upgrade if I do say so myself!</p>
<div id="attachment_117" class="wp-caption aligncenter" style="width: 424px"><a href="http://blog.elliotjameschong.com/wp-content/uploads/2011/04/firebug-console-frames.png"><img src="http://blog.elliotjameschong.com/wp-content/uploads/2011/04/firebug-console-frames.png" alt="" title="Firebug Console Switching Frame Context" width="414" height="249" class="size-full wp-image-117" /></a><p class="wp-caption-text">Debugging within a Facebook application's context</p></div>
<p><i>Note: The Webkit JavaScript console (latest Chrome and Safari builds as of the time of this post) currently does not allow switching the context of to a frame loaded from a different domain.</i></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elliotjameschong.com/2011/04/04/debugging-facebook-applications-for-fun-and-profit-firefox-4-firebug/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flash is Dead! Long Live Flash!</title>
		<link>http://blog.elliotjameschong.com/2011/03/07/flash-is-dead-long-live-flash/</link>
		<comments>http://blog.elliotjameschong.com/2011/03/07/flash-is-dead-long-live-flash/#comments</comments>
		<pubDate>Tue, 08 Mar 2011 02:50:20 +0000</pubDate>
		<dc:creator>Elliot Chong</dc:creator>
				<category><![CDATA[Speaking]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flashdebate]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[speaking]]></category>
		<category><![CDATA[SXSW]]></category>

		<guid isPermaLink="false">http://blog.elliotjameschong.com/?p=92</guid>
		<description><![CDATA[Heading to <a href="http://sxsw.com/">SXSW</a> this year? <p>Join <a href="http://twitter.com/tobius">@Toby Miller</a> and <a href="http://twitter.com/ElliotChong">@I</a> as we embark on <a href="http://schedule.sxsw.com/events/event_IAP6458">a deep dive into the world of &#8216;Flash hating&#8217;</a>, and what it means for the future of the internet. (#flashdebate)</p> <p>Update 04/04/2011 &#8211; Embedded presentation below.</p> <p></p> <p>Since this is my first SXSW I&#8217;ve been doing a [...]]]></description>
				<content:encoded><![CDATA[            <script type="text/javascript" src="http://blog.elliotjameschong.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushJava.js"></script>
<h4>Heading to <a href="http://sxsw.com/">SXSW</a> this year?</h4>
<p>Join <a href="http://twitter.com/tobius">@Toby Miller</a> and <a href="http://twitter.com/ElliotChong">@I</a> as we embark on <a href="http://schedule.sxsw.com/events/event_IAP6458">a deep dive into the world of &#8216;Flash hating&#8217;</a>, and what it means for the future of the internet. (#flashdebate)</p>
<p><i><b>Update 04/04/2011 &#8211; Embedded presentation below.</b></i></p>
<p><iframe src="http://app.sliderocket.com:80/app/fullplayer.aspx?id=8CEADA83-F640-6318-406A-49DE5EA27845" width="600" height="481" scrolling=no frameBorder="0"></iframe></p>
<p>Since this is my first SXSW I&#8217;ve been doing a little research on what I might expect when I meet &#8216;the internet&#8217; IRL (in real life.) Thankfully, <a href="http://www.ifc.com/sxsw/">Alex Blagg</a> has me covered with this informative How To Be South By South Best video:</p>
<p><iframe title="How To Be Your South By South Best" width="598" height="365" src="http://www.youtube.com/embed/hx3FC_DWsGQ" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elliotjameschong.com/2011/03/07/flash-is-dead-long-live-flash/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to Add an iframe to a FBML Tab</title>
		<link>http://blog.elliotjameschong.com/2011/02/09/how-to-add-an-iframe-to-a-fbml-tab/</link>
		<comments>http://blog.elliotjameschong.com/2011/02/09/how-to-add-an-iframe-to-a-fbml-tab/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 15:28:03 +0000</pubDate>
		<dc:creator>Elliot Chong</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[fbml]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[iframe]]></category>

		<guid isPermaLink="false">http://blog.elliotjameschong.com/?p=83</guid>
		<description><![CDATA[<p>Update &#8211; Facebook has <a href="http://goo.gl/2SvSq" rel="_blank">released iframe support for Tabs</a>. Please use this method of implementing iframes moving forward.</p> <p>This is a temporary workaround for loading iframes into FBML tabs until FBML is fully deprecated in Q1 of 2011. This method requires a click to activate to load the iframe. Once the deprecation is [...]]]></description>
				<content:encoded><![CDATA[            <script type="text/javascript" src="http://blog.elliotjameschong.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushJava.js"></script>
            <script type="text/javascript" src="http://blog.elliotjameschong.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
<p><i><b>Update &#8211; Facebook has <a href="http://goo.gl/2SvSq" rel="_blank">released iframe support for Tabs</a>. Please use this method of implementing iframes moving forward.</b></i></p>
<p>This is a temporary workaround for loading iframes into FBML tabs until FBML is fully deprecated in Q1 of 2011. This method requires a click to activate to load the iframe. Once the deprecation is complete this FBML code will need to be replaced with Facebook&#8217;s prescribed solution.</p>
<p>Check out the <a href="http://goo.gl/sZOHP" rel="_blank" >live example &#038; source of the code below</a>.</p>
<p><pre class="brush: xml">&lt;fb:js-string var=&quot;myFrame&quot;&gt;
  &lt;fb:iframe width=&quot;100%&quot; height=&quot;600&quot; frameborder=&quot;0&quot; src=&quot;http://fbrell.com/&quot; /&gt;
&lt;/fb:js-string&gt;
&lt;div id=&quot;app-container&quot; style=&quot;cursor: pointer;&quot;
     onclick=&quot;document.getElementById('app-container').setInnerFBML(myFrame)&quot;&gt;
  &lt;img height=&quot;600&quot; width=&quot;100%&quot; src=&quot;http://fbrell.com/bliss.jpg?v=2&quot;&gt;
&lt;/div&gt;</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elliotjameschong.com/2011/02/09/how-to-add-an-iframe-to-a-fbml-tab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Add a Facebook Like Button to a FBML Tab</title>
		<link>http://blog.elliotjameschong.com/2011/01/03/how-to-add-a-facebook-like-button-to-a-fbml-tab/</link>
		<comments>http://blog.elliotjameschong.com/2011/01/03/how-to-add-a-facebook-like-button-to-a-fbml-tab/#comments</comments>
		<pubDate>Mon, 03 Jan 2011 05:27:38 +0000</pubDate>
		<dc:creator>Elliot Chong</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[like button]]></category>

		<guid isPermaLink="false">http://blog.elliotjameschong.com/?p=9</guid>
		<description><![CDATA[<p>Due to Facebook&#8217;s restrictions on JavaScript and iFrames within FBML tabs <a href="http://developers.facebook.com/docs/reference/plugins/like">Like Buttons</a> were once considered a feature of the Facebook elite, namely: Canvas Applications and external websites. Thankfully this walled garden is no more, and through a little CSS trickery we can commandeer the <a href="http://developers.facebook.com/docs/reference/fbml/comments">fb:comments&#8217;</a> Like button and bring its power back [...]]]></description>
				<content:encoded><![CDATA[            <script type="text/javascript" src="http://blog.elliotjameschong.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushJava.js"></script>
            <script type="text/javascript" src="http://blog.elliotjameschong.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushXml.js"></script>
            <script type="text/javascript" src="http://blog.elliotjameschong.com/wp-content/plugins/wordpress-code-snippet/scripts/shBrushCss.js"></script>
<p>Due to Facebook&#8217;s restrictions on JavaScript and iFrames within FBML tabs <a href="http://developers.facebook.com/docs/reference/plugins/like">Like Buttons</a> were once considered a feature of the <i>Facebook elite</i>, namely: Canvas Applications and external websites. Thankfully this walled garden is no more, and through a little CSS trickery we can commandeer the <a href="http://developers.facebook.com/docs/reference/fbml/comments">fb:comments&#8217;</a> Like button and bring its power back to the people!
<div id="attachment_63" class="wp-caption aligncenter" style="width: 590px"><a href="http://blog.elliotjameschong.com/wp-content/uploads/2011/01/comments_like_button1.png"><img src="http://blog.elliotjameschong.com/wp-content/uploads/2011/01/comments_like_button1.png" alt="fb:comments&#039; Like Button" title="fb:comments&#039; Like Button" width="580" height="235" class="size-full wp-image-63" /></a><p class="wp-caption-text">fb:comments' Like Button</p></div>
<p>As an added bonus this hijacked Like button can reference any <a href="http://developers.facebook.com/docs/opengraph">OpenGraph object</a>, including Fan pages and official metadata-created Like buttons, which isn&#8217;t possible with the standard Facebook Like button.</p>
<div id="attachment_65" class="wp-caption aligncenter" style="width: 600px"><a href="http://blog.elliotjameschong.com/wp-content/uploads/2011/01/comment_like_button_demo.png"><img src="http://blog.elliotjameschong.com/wp-content/uploads/2011/01/comment_like_button_demo.png" alt="fb:comment Like Hijack" title="fb:comment Like Hijack" width="590" height="314" class="size-full wp-image-65" /></a><p class="wp-caption-text">Using the fb:comment's Like Button to bring the Like button to a FBML tab.</p></div>
<p><em>Note: IE does not support CSS that is defined within a style tag in FBML, so as a best practice I&#8217;ve loaded the CSS from an external stylesheet. Ignore this step and bake the CSS right into the FBML if you don&#8217;t mind those silly IE users seeing your page render incorrectly. Besides, Facebook doesn&#8217;t support IE6, why should you?</em></p>
<h3>External StyleSheet &#8216;likeHack.css&#8217;</h3>
<p><pre class="brush: css">/**
 * Hide the Comments component.
**/
div.comment_body { display: none; }

/**
 * Uncomment the line below if you'd like to constrain the width
 * of the Like component.
**/
/*div.like { width: 200px; }*/

/**
 * Uncomment the line below to disable the Friend Pile under
 * the Like button.
**/
/*div.connect_widget_sample_connections { display: none; }*/</pre></p>
<h3>FBML</h3>
<p><pre class="brush: xml">&lt;!--
Load external stylesheet.
--&gt;
&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;./likeHack.css&quot;/&gt;

&lt;!--
@property xid
Replace the xid property with the OpenGraph id of your choosing.
This can be an existing Like button, a fan page, or any
OpenGraph object.

@property returnurl
Specify the returnul as the page containing the
Comments component.
--&gt;
&lt;fb:comments xid=&quot;128836417130060&quot;
	width=&quot;200&quot;
	returnurl=&quot;http://www.facebook.com/pages/The-Code-Laboratory/128836417130060?v=app_4949752878&quot; &gt;
&lt;/fb:comments&gt;</pre></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.elliotjameschong.com/2011/01/03/how-to-add-a-facebook-like-button-to-a-fbml-tab/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
