<?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>Silverlight &#124; WPF &#124; Microsoft.Net &#187; Open Source</title>
	<atom:link href="http://joel.neubeck.net/category/open-source/feed/" rel="self" type="application/rss+xml" />
	<link>http://joel.neubeck.net</link>
	<description>Simplifing structure without changing results</description>
	<lastBuildDate>Fri, 01 Apr 2011 21:34:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>SL Video Player used on Microsoft Mediaroom site</title>
		<link>http://joel.neubeck.net/2009/01/sl-video-player-used-on-microsoft-mediaroom-site/</link>
		<comments>http://joel.neubeck.net/2009/01/sl-video-player-used-on-microsoft-mediaroom-site/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 23:07:59 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Microsoft.Net 2.0]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[CodePlex]]></category>
		<category><![CDATA[Silverlight]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/?p=325</guid>
		<description><![CDATA[Some of you who follow my blog (which I apologize for how stale it has been) know that Tim Heuer and I worked on a Silverlight Video player which we posted on CodePlex.  Every once in while Tim clues me into people that might be using it and this one popped up today.  I thought [...]]]></description>
			<content:encoded><![CDATA[<p>Some of you who follow my blog (which I apologize for how stale it has been) know that <a href="http://timheuer.com/blog/">Tim Heuer</a> and I worked on a Silverlight Video player which we posted on <a href="http://www.codeplex.com/sl2videoplayer">CodePlex</a>.  Every once in while Tim clues me into people that might be using it and this one popped up today.  I thought it was cool enough to post!</p>
<p><a href="http://www.microsoft.com/mediaroom/" target="_blank"><img class="aligncenter size-full wp-image-326" title="mm_logo_162x59-copy" src="http://joel.neubeck.net/wp-content/uploads/2009/01/mm_logo_162x59-copy.png" alt="mm_logo_162x59-copy" width="170" height="70" /></a><br style="clear:both"/></p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2009/01/sl-video-player-used-on-microsoft-mediaroom-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight Video Player updated to display Closed Captioning</title>
		<link>http://joel.neubeck.net/2008/07/sl2videoplayer-closed-captioning/</link>
		<comments>http://joel.neubeck.net/2008/07/sl2videoplayer-closed-captioning/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 15:02:47 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[CodePlex]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[Closed Captioning]]></category>
		<category><![CDATA[ToggleButton]]></category>
		<category><![CDATA[Video Player]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/?p=205</guid>
		<description><![CDATA[Yesterday I completed the first version of Closed Captioning support for the Silverlight 2 Video Player on CodePlex.  It definitely in an alpha phase, but with some polish it should be reliable and more usable.  Here is an image of how the captions are being displayed. In this first version I made a decision to [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I completed the first version of Closed Captioning support for the <a title="SL2 Video Player" href="http://www.codeplex.com/sl2videoplayer/" target="_blank">Silverlight 2 Video Player</a> on CodePlex.  It definitely in an alpha phase, but with some polish it should be reliable and more usable.  Here is an image of how the captions are being displayed.</p>
<p><a href="http://joel.neubeck.net/wp-content/uploads/2008/07/video_cc.png"><img class="aligncenter size-full wp-image-206" title="video_cc" src="http://joel.neubeck.net/wp-content/uploads/2008/07/video_cc.png" alt="" width="500" height="248" /></a><br style="clear:both"/>In this first version I made a decision to display closed captioning when the volume is muted, but with the right visualization we should be able to find a nice place for a ToggleButton.  Here is a list of a few other things I did to the project.</p>
<ul>
<li>Updated Xml parsing to support markers with multiple types (Marker, CC, etc)</li>
<li>Converted speaker button control to ToggleButton to display a different visualization when the player is muted.</li>
<li>Linked volumeSlider to speaker button so slider drops to zero on mute and back to previous volume when mute is turned off.</li>
<li>Added a new event from mediaControl that is fired when the volume is changed.  This allows the player to control closed captioning display and not the media controller.</li>
<li>Wrote closedCaptioning UserControl that visualizes the scrolling captions.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2008/07/sl2videoplayer-closed-captioning/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Asynchronous loading of TimelineMarkers for Silverlight Video Player</title>
		<link>http://joel.neubeck.net/2008/07/asynchronous-loading-of-timelinemarkers-for-silverlight-video-player/</link>
		<comments>http://joel.neubeck.net/2008/07/asynchronous-loading-of-timelinemarkers-for-silverlight-video-player/#comments</comments>
		<pubDate>Thu, 03 Jul 2008 20:50:05 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[CodePlex]]></category>
		<category><![CDATA[Dispatcher.BeginInvoke]]></category>
		<category><![CDATA[TimeLineMarker]]></category>
		<category><![CDATA[Video Player]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/2008/07/asynchronous-loading-of-timelinemarkers-for-silverlight-video-player/</guid>
		<description><![CDATA[As part of the ongoing evolution of our Open Source Silverlight Video Player on CodePlex, I added the ability to asynchronously load a set of TimeLineMarkers from an XML document.&#160; The goal was to allow users a choice between encoding there video with markers or defining those markers in an external xml file.&#160; What I [...]]]></description>
			<content:encoded><![CDATA[<p>As part of the ongoing evolution of our Open Source <a href="http://www.codeplex.com/sl2videoplayer/" target="_blank">Silverlight Video Player on CodePlex</a>, I added the ability to asynchronously load a set of <strong>TimeLineMarkers</strong> from an XML document.&#160; The goal was to allow users a choice between encoding there video with markers or defining those markers in an external xml file.&#160; What I thought would be a pretty trivial task, proved to be an interesting challenge. Here is a snapshot of the Xml format.</p>
<p><a href="http://joel.neubeck.net/wp-content/uploads/2008/07/marker-1.png"><img title="marker_1" style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="164" alt="marker_1" src="http://joel.neubeck.net/wp-content/uploads/2008/07/marker-1-thumb.png" width="473" align="left" border="0" /></a> </p>
<p>  <br style="clear: both" />
<p>The first step in implementing this functionality was to download the marker Xml.&#160; In the event that this marker file was quite large in size I decided to make the download asynchronous.&#160; Downloading a file asynchronously required that the path to the file is absolute.&#160; Since I have no real control over my <strong>initParams</strong> I decided to support both an absolute or relative Uri.&#160; In the event that the path to the Xml document is relative, I make a reasonable assumption that it is located in the same location as the XAP.&#160; As a result ,I can define my Uri with “<strong>Host.Source</strong>” as the baseUri of the Xml document.&#160; To Download the file, I simply make a <strong>WebRequest</strong> and define an <strong>AsyncCallback</strong> to be fired when the file has completed downloading.&#160; </p>
<p><strong>Threading Considerations</strong></p>
<p>In Silverlight 2 Beta 2 there was a significant change in the concurrency model used for asynchronous communications.&#160; In Beta 1 these type of requests returned on the UI thread.&#160; In Beta 2, when you choose to use the BeginGetResponse of the WebRequest you are telling Silverlight to use a worker thread that comes from a thread pool.&#160; As a result, you can NOT update any user interface elements on the UI thread.&#160; Initially I thought I would be able to use “Application.Current.RootVisual.Dispatcher” as a way to execute a delegate on the UIThread.&#160; Unfortunately this throws a Cross Thread exception.&#160; After explored a few options I realized that I could simply call <strong>Dispatcher.BeginInvoke(MyMethod)</strong> from within my AsyncCallback.&#160; here is what that looked like.</p>

<div class="wp_syntax"><div class="code"><pre class="c-sharp" style="font-family:monospace;">void OpenStreamCompleted(IAsyncResult ar)
{
    HttpWebRequest request = ar.AsyncState as HttpWebRequest;
    WebResponse response = request.EndGetResponse(ar);
&nbsp;
    // Read the response into a Stream object.
    Stream responseStream = response.GetResponseStream();
&nbsp;
    // Create a new StreamReader instance using the specified Stream object.
    using (StreamReader streamreader = new StreamReader(responseStream))
    {
        XElement document = XElement.Load(streamreader); 
        _externalMarkerData = (from el in document.Elements() select GetMarkerData(el)).ToList();
    }
    Dispatcher.BeginInvoke(ProcessParsedMarkerCollection);
}</pre></div></div>

<p>As you can see above, once I have the Xml downloaded I parse it from Xml into a collection. For this I thought it would be cool to use Linq for XML.&#160; I am always amazed at how few a lines of code I need to write to parse an Xml document with Linq.&#160; The end product of the parse is a List&lt;&gt; containing a very simple custom object called “MarkerData”.&#160; If I had chosen to move this parsing back to the UIThread I could have just created a collection of TimelineMarkers, but I thought there was no harm in having my own object to expand over time.</p>
<p>To get the latest source visit the project at <a title="http://www.codeplex.com/sl2videoplayer" href="http://www.codeplex.com/sl2videoplayer">http://www.codeplex.com/sl2videoplayer</a></p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2008/07/asynchronous-loading-of-timelinemarkers-for-silverlight-video-player/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Silverlight 2 Video Player pushed to CodePlex</title>
		<link>http://joel.neubeck.net/2008/06/silverlight-2-video-player-pushed-to-codeplex/</link>
		<comments>http://joel.neubeck.net/2008/06/silverlight-2-video-player-pushed-to-codeplex/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 18:26:03 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[CodePlex]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Silverlight]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Tim Heuer]]></category>
		<category><![CDATA[Video Player]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/?p=166</guid>
		<description><![CDATA[Yesterday Tim Heuer made a great suggestion that we submit our collaboration on a  Silverlight 2 Video Player as Open Source to CodePlex. You can now find the latest source at http://www.codeplex.com/sl2videoplayer.  As we find any &#8220;undocumented features&#8221; or add new and exciting ehancments we will push these up to CodePlex.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.codeplex.com/sl2videoplayer"><img class="alignleft size-full wp-image-167" title="codeplex-logo_thumb" src="http://joel.neubeck.net/wp-content/uploads/2008/06/codeplex-logo_thumb.jpg" alt="" width="235" height="92" /></a>Yesterday Tim Heuer made a great suggestion that we submit our collaboration on a  Silverlight 2 Video Player as Open Source to CodePlex.  You can now find the latest source at <a title="http://www.codeplex.com/sl2videoplayer" href="http://www.codeplex.com/sl2videoplayer">http://www.codeplex.com/sl2videoplayer</a>.  As we find any &#8220;undocumented features&#8221; or add new and exciting ehancments we will push these up to CodePlex.</p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2008/06/silverlight-2-video-player-pushed-to-codeplex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Google Apps for Domain Email</title>
		<link>http://joel.neubeck.net/2008/01/google-apps-for-domain-email/</link>
		<comments>http://joel.neubeck.net/2008/01/google-apps-for-domain-email/#comments</comments>
		<pubDate>Mon, 07 Jan 2008 19:52:24 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[godaddy]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[iphone]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/2008/01/google-apps-for-domain-email/</guid>
		<description><![CDATA[For those of you in hibernation for the last few years, Google is taking over the world, one free service after another.  This weekend I decided to break ties with Godaddy&#8217;s crappy email hosting (5 accounts, 1 GB storage, $20 year) and switch to Google Apps.   My reasons were quite simple, Free is Free and [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://joel.neubeck.net/wp-content/uploads/2008/01/150x55.gif" alt="Google Apps" class="imageframe imgalignleft" height="55" width="150" />For those of you in hibernation for the last few years, Google is taking over the world, one free service after another.  This weekend I decided to break ties with Godaddy&#8217;s crappy email hosting (5 accounts, 1 GB storage, $20 year) and switch to <a href="http://www.google.com/a/" title="Google Apps" target="_blank">Google Apps</a>.   My reasons were quite simple, Free is Free and I really wanted IMAP support.  I know that the risk is pretty high with &#8220;big brother&#8221; now in control, but for IMAP support and <span id="quota">&gt;6</span> GB of storage per account, I think it is worth the risk.</p>
<p>For the most part the switch was painless.  The first step in the process was to create an account and prove that you own the domain.  Proof is achieved by creating a custom CNAME record in your DNS that maps to google.com.  Once the domain is validated you can begin creating user accounts.  In my situation I only had 5 accounts so I created them manually, but for larger organizations they have a &#8220;csv&#8221; upload utility that imports a large batch.  Once I created all of the accounts, I added any necessary account alias (they call them nicknames) and then switched my hostnames MX records.  Google warns that it could take up to 48 hours, but in about a hour the changes had propagated to my internet provider.</p>
<p>If you choose to make the switch, make sure that you tell of of your users to access there new account via the web first.  Google makes you enter a &#8220;captcha&#8221; image and agree to a terms screen.  Once this is completed you can enable IMAP support and import you existing email.  Google does NOT provide an import tool, not even from one Gmail account to another.  The approach most take, is enable POP access on your old account, and suck in all of the email using there Mail Fetcher.  Make sure that if you had &#8220;labels&#8221; you recreate those before importing as well as manually create all of your filters.</p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2008/01/google-apps-for-domain-email/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FBJS and Ajax to acheive Facebook profile link tracking</title>
		<link>http://joel.neubeck.net/2007/11/fbjs-ajax-facebook/</link>
		<comments>http://joel.neubeck.net/2007/11/fbjs-ajax-facebook/#comments</comments>
		<pubDate>Sat, 24 Nov 2007 05:16:26 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Microsoft.Net 2.0]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[fbjs]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/2007/11/fbjs-ajax-facebook/</guid>
		<description><![CDATA[In interactive application development we love our ability to track and analyze the behavior of our users. Through tools like Google analytics and Urchin, web sites can monitor and analyze where their users are going, and more importantly how those users are getting there. As our company delves deeper into creating applications for the Facebook [...]]]></description>
			<content:encoded><![CDATA[<p>In interactive application development we love our ability to track and analyze the behavior of our users.   Through tools like Google analytics and Urchin, web sites can monitor and analyze where their users are going, and more importantly how those users are getting there.  </p>
<p>As our company delves deeper into creating applications for the Facebook platform, we have realized that analysis of users behavior is extremely important.  It is no secret that very few companies have mastered how to create a success Facebook application.    Those that have seen moderate success do one thing consistently, they all  leverage the social graph, but outside of that there is no clear blue print to success.   Using techniques such as user tracking we can begin to tune the way a Facebook applications evolves as a way to change its presentation based on the behaviors of its users.  </p>
<p>Integrating analytics into a  canvas view it is pretty simple, slap in some Google analytics and you can begin to monitor and tune user traffic.  The profile view is much more challenging.  In the profile view an applications FBML and images are cached and delivered from a Facebook server.  Using traditional Google analytics in the profile is not possible.   I hope someday Facebook will show us how many users view and interact with a users profile, but until then we need some way to track a users interaction with our application.  Back in October Facebook gave developers the ability to do some restricted Javascript and Ajax.  With these two features, we can begin to track what links a user click and how those clicks relate to a users interaction with the canvas view.  The following snip of FBJS will post a small JSON array to a external location, which in turn will asynchronously store that data for later analysis.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;&lt;!--</span>
    <span style="color: #003366; font-weight: bold;">var</span> uid <span style="color: #339933;">=</span> <span style="color: #3366CC;">'111111'</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">function</span> track<span style="color: #009900;">&#40;</span>a<span style="color: #339933;">,</span> pid<span style="color: #339933;">,</span> method<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #006600; font-style: italic;">// ajax query</span>
        <span style="color: #003366; font-weight: bold;">var</span> ajax <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">new</span> Ajax<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        ajax.<span style="color: #660066;">responseType</span> <span style="color: #339933;">=</span> Ajax.<span style="color: #660066;">RAW</span><span style="color: #339933;">;</span>
        ajax.<span style="color: #660066;">requireLogin</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">false</span><span style="color: #339933;">;</span>
        <span style="color: #003366; font-weight: bold;">var</span> queryParams <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span> <span style="color: #3366CC;">&quot;pid&quot;</span> <span style="color: #339933;">:</span> pid<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;method&quot;</span> <span style="color: #339933;">:</span> method<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;uid&quot;</span><span style="color: #339933;">:</span> uid<span style="color: #339933;">,</span> <span style="color: #3366CC;">&quot;source&quot;</span><span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;profile&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
        ajax.<span style="color: #660066;">post</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://url.com/tracker.ashx&quot;</span><span style="color: #339933;">,</span> queryParams<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #006600; font-style: italic;">//--&gt;&lt;/script&gt;</span></pre></td></tr></table></div>

<p>To enable this tracking we must add the following callback attached to that elements onclick event.  In our example we are attaching tracking to a link which provides an external vendors affiliate link for a series of consumer products.  </p>
<p>One caveat, this approach only works correctly in Firefox if your &lt;a&gt; target is set to blank.  If you  need to use the same window, the only approach I have found  is to use the anchor that is passed into the track method combined with the ajax.ondone callback to set the document.setLocation to the anchors href.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;">ajax.<span style="color: #660066;">ondone</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #003366; font-weight: bold;">var</span> href <span style="color: #339933;">=</span> a.<span style="color: #660066;">getHref</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>href.<span style="color: #660066;">length</span> <span style="color: #339933;">&gt;</span> <span style="color: #CC0000;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      document.<span style="color: #660066;">setLocation</span><span style="color: #009900;">&#40;</span>a.<span style="color: #660066;">getHref</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>a href<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://www.amazon.com&quot;</span> onclick<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;track(this,12345,'buy');&quot;</span> <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;buy&quot;</span> target<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;_blank&quot;</span><span style="color: #339933;">&gt;</span>BUY<span style="color: #339933;">&lt;/</span>a<span style="color: #339933;">&gt;</span></pre></td></tr></table></div>

<p>On the back end we have a page that is waiting for this specific Ajax post, and will return a 1 for success and a 0 for failure.  It is extremely important to keep this tracking as efficient as possible.  Facebook Ajax has a <10 second maximum timeout on all requests.  In our design, the storing of the data is done using a asynchronous thread that queues up the incoming requests in hoped to avoid Facebook having to wait for us to store the data correctly.  </p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2007/11/fbjs-ajax-facebook/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Facebook Developers Garage Presentation</title>
		<link>http://joel.neubeck.net/2007/11/fdg-phx-presentation/</link>
		<comments>http://joel.neubeck.net/2007/11/fdg-phx-presentation/#comments</comments>
		<pubDate>Fri, 16 Nov 2007 22:00:40 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Presentations]]></category>
		<category><![CDATA[Terralever]]></category>
		<category><![CDATA[facebook]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/2007/11/fdg-phx-presentation/</guid>
		<description><![CDATA[On November 14th @ the Tempe Center for the Arts Terralever hosted Phoenix’s first Facebook Developer’s Garage. The event was a great success.  I especially enjoyed the presentations by Chris Johnson  of Terralever and Dave Morin of Facebook. I encourage everyone to look at Chris slides on marketing a Facebook application. For those of you who might be interested [...]]]></description>
			<content:encoded><![CDATA[<p><a rel="lightbox[pics-1195942360]" href="http://joel.neubeck.net/wp-content/uploads/2007/10/fb_garage.jpg" title="Facebook - Developers Garage - Phoenix"><img width="125" src="http://joel.neubeck.net/wp-content/uploads/2007/10/fb_garage.thumbnail.jpg" alt="Facebook - Developers Garage - Phoenix" height="200" class="imageframe imgalignleft" /></a><span style="color: #333333; font-family: 'Trebuchet MS','sans-serif'" lang="EN">On November 14th @ the Tempe Center for the Arts Terralever hosted Phoenix’s first Facebook Developer’s Garage. The event was a great success.  I especially enjoyed the presentations by <a href="http://www.facebook.com/profile.php?id=515434240"><font color="#0000ff">Chris Johnson</font></a>  of Terralever and <a href="http://www.facebook.com/profile.php?id=10200882"><font color="#0000ff">Dave Morin</font></a> of Facebook. I encourage everyone to look at Chris slides on marketing a Facebook application. For those of you who might be interested in what I spoke about take a look at my 15 min presentation on the “Anatomy of a Facebook App”  With so little time,  I was unable to jump to deep into the platform, but managed to get through the basic steps to create a your first Facebook Application.<o:p></o:p></span></p>
<p style="line-height: 19.2pt"><span style="color: #333333; font-family: 'Trebuchet MS','sans-serif'" lang="EN">Download: <a target="_blank" href="http://joel.neubeck.net/wp-content/uploads/2007/11/fdgphx_joel_neubeck.ppt"><font color="#0000ff">Anatomy of a Facebook Application</font></a><br />
Date: November 14, 2007<br />
Location: Tempe Center for the Arts</span></p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2007/11/fdg-phx-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook &#8211; fbml_refreshImgSrc</title>
		<link>http://joel.neubeck.net/2007/10/facebook-fbml_refreshimgsrc/</link>
		<comments>http://joel.neubeck.net/2007/10/facebook-fbml_refreshimgsrc/#comments</comments>
		<pubDate>Thu, 18 Oct 2007 21:08:39 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[fbml_refreshImgSrc]]></category>
		<category><![CDATA[rest]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/2007/10/facebook-fbml_refreshimgsrc/</guid>
		<description><![CDATA[Maybe its just a temporary thing, but lately the Facebook server has had major issues with caching images.  If you are unaware, all images that are placed within a users profile page get scraped by Facebook and served up from their own internal servers.  If for some unforeseen reason there scraper fails your image gets replaced with [...]]]></description>
			<content:encoded><![CDATA[<p>Maybe its just a temporary thing, but lately the Facebook server has had major issues with caching images.  If you are unaware, all images that are placed within a users profile page get scraped by Facebook and served up from their own internal servers.  If for some unforeseen reason there scraper fails your image gets replaced with an invisible pixel spacer gif.  To force the cache to update you have to manually call the <strong>fbml_refreshImgSrc</strong> method on their REST server.  The easiest way to accomplish this is to create a dedicated page that uses an infinite session.  Here is the PHP page I created to update the images as necessary.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$myClass</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> my_class<span style="color: #009900;">&#40;</span><span style="color: #000088;">$api_key</span><span style="color: #339933;">,</span> <span style="color: #000088;">$secret</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #666666; font-style: italic;">//this sets a user and session </span>
<span style="color: #000088;">$myClass</span> <span style="color: #339933;">-&gt;</span><span style="color: #004000;">facebook</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">set_user</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$global_user</span><span style="color: #339933;">,</span> <span style="color: #000088;">$global_session</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
  <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">''</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$myClass</span> <span style="color: #339933;">-&gt;</span><span style="color: #004000;">facebook</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">api_client</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fbml_refreshImgSrc</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'url'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span><span style="color: #0000ff;">''</span><span style="color: #339933;">;</span> 
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2007/10/facebook-fbml_refreshimgsrc/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Facebook &#8211; feed.publishTemplatizedAction</title>
		<link>http://joel.neubeck.net/2007/10/facedbook-feedpublishtemplatizedaction/</link>
		<comments>http://joel.neubeck.net/2007/10/facedbook-feedpublishtemplatizedaction/#comments</comments>
		<pubDate>Sun, 14 Oct 2007 17:00:35 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[fbml]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/2007/10/facedbook-feedpublishtemplatizedaction/</guid>
		<description><![CDATA[This past week Facebook added a new method on their REST server for sending news and mini feed stories. The method is “feed.publishTemplatizedAction” and the intent of this method is to replace the existing “feed.publishActionOfUser” with a method that is more “templatized”. Here is a sample we created which is a combination of static text [...]]]></description>
			<content:encoded><![CDATA[<p>This past week Facebook added a new method on their REST server for sending news and mini feed stories. The method is <b>“feed.publishTemplatizedAction”</b> and the intent of this method is to replace the existing “feed.publishActionOfUser” with a method that is more “templatized”. Here is a sample we created which is a combination of static text and data we gathered from a RSS feed. When a users first installs our application we will publish this news story.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
</pre></td><td class="code"><pre class="" style="font-family:monospace;">actor_id: <span style="">555555555</span>
title_template:   <span class="br0">&#123;</span>actor<span class="br0">&#125;</span> &lt;fb:if-multiple-actors&gt;are&lt;fb:else&gt;is&lt;/fb:else&gt;
           &lt;/fb:if-multiple-actors&gt; exploring the web’s premier collection of 
            student-produced digital media Made on a Mac. 
title_data: 
body_template: &lt;b&gt;&quot;<span class="br0">&#123;</span>title<span class="br0">&#125;</span>&quot;&lt;/b&gt; Made by &lt;i&gt;<span class="br0">&#123;</span>author<span class="br0">&#125;</span>&lt;/i&gt;  
           - See it at the &lt;a href=&quot;http://url/item.php?itemID=<span class="br0">&#123;</span>id<span class="br0">&#125;</span>&quot;&gt;
           Apple Student Gallery&lt;/a&gt; 
body_data: <span class="br0">&#123;</span>&quot;title&quot;:&quot;Lost&quot;, &quot;author&quot;:&quot;Jared A. Jaworski&quot;,&quot;id&quot;:<span style="">13243</span><span class="br0">&#125;</span> 
body_general: 
image_1: http://url/resize3.php?image=/<span style="">109</span>.jpg 
image_1_link: http://url/resize4.php?image=/<span style="">109</span>.jpg 
target_ids:</pre></td></tr></table></div>

<p><img width="436" src="http://joel.neubeck.net/wp-content/uploads/2007/10/fb_news1.gif" alt="Sample" height="302" class="imageframe imgalignleft" /><br />
As illustrated in the sample, if multiple users publish stories where both the title_template and body_template markup strings are identical, as well as the title_data and body_data arrays, then Facebook may aggregated the stories together.  When this occurs, the {actor} token is replaced with the names of all of the users whose actions are being aggregated.   Also note, that the only valid HTML tags supported in the template is the &lt;a&gt;, &lt;b&gt; and &lt;i&gt;.</p>
<p>For more information check out Facebooks wiki at <a href="http://wiki.developers.facebook.com/index.php/Feed.publishTemplatizedAction">Feed.publishTemplatizedAction<br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2007/10/facedbook-feedpublishtemplatizedaction/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Facebook Developer&#8217;s Garage &#8211; Phoenix</title>
		<link>http://joel.neubeck.net/2007/10/facebook-garage-nov/</link>
		<comments>http://joel.neubeck.net/2007/10/facebook-garage-nov/#comments</comments>
		<pubDate>Fri, 12 Oct 2007 22:16:09 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[facebook]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/2007/10/facebook-garage-nov/</guid>
		<description><![CDATA[On November 14th @ the Tempe Center for the Arts Terralever will be hosting Phoenix&#8217;s inaugural Facebook Developer&#8217;s Garage. Anyone who is interested in diving deep into the Facebook Platform is welcome to join. The event is a forum to share ideas with local developers and listen to interesting presentations on the planning, development, implementation, [...]]]></description>
			<content:encoded><![CDATA[<p><img width="200" src="http://joel.neubeck.net/wp-content/uploads/2007/10/fb_garage.jpg" alt="Facebook - Developers Garage - Phoenix" height="318" class="imageframe imgalignright" />On November 14th @ the Tempe Center for the Arts Terralever will be hosting Phoenix&#8217;s inaugural Facebook Developer&#8217;s Garage. Anyone who is interested in diving deep into the Facebook Platform is welcome to join. The event is a forum to share ideas with local developers and listen to interesting presentations on the planning, development, implementation, and marketing of Facebook applications.</p>
<p>To see more details and RSVP, follow the link below:<br />
<a href="http://www.facebook.com/n/?event.php&#038;eid=5321528989<br />
">http://www.facebook.com/n/?event.php&#038;eid=5321528989</a></p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2007/10/facebook-garage-nov/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

