<?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; facebook</title>
	<atom:link href="http://joel.neubeck.net/tag/facebook/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>Facebook f8 Developers Conference</title>
		<link>http://joel.neubeck.net/2008/07/facebook-f8/</link>
		<comments>http://joel.neubeck.net/2008/07/facebook-f8/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 19:52:46 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Industry]]></category>
		<category><![CDATA[Terralever]]></category>
		<category><![CDATA[Connect]]></category>
		<category><![CDATA[f8]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[Flash AS2]]></category>
		<category><![CDATA[Redbull]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/?p=209</guid>
		<description><![CDATA[Wednesday I had the great opportunity to participate in the second annual f8 developers conference in San Francisco.  Last year I attended on behalf of Terralever, one of only about 30 selected launch partners.   A few weeks before the first f8, Terralever was asked to develop two proof of concepts apps that demonstrated the power [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://joel.neubeck.net/wp-content/uploads/2008/07/n11204705797_649842_5505.jpg"><img class="alignleft size-thumbnail wp-image-210" title="n11204705797_649842_5505" src="http://joel.neubeck.net/wp-content/uploads/2008/07/n11204705797_649842_5505-150x150.jpg" alt="" width="150" height="150" /></a>Wednesday I had the great opportunity to participate in the second annual f8 developers conference in San Francisco.   Last year I attended on behalf of Terralever, one of only about 30 selected launch partners.   A few weeks before the first f8, Terralever was asked to develop two proof of concepts apps that demonstrated the power of Platform.  It was a crazy two weeks of development, but we pulled it off and were one of the first Agency to have proven Facebook platform experience.  Since then, we have built various applications, some for start ups looking to use Facebook as there platform, while other for big brands like BMW and Nike.</p>
<p><a href="http://joel.neubeck.net/wp-content/uploads/2008/07/redbull_bulls.png"><img class="alignright size-medium wp-image-213" title="redbull_bulls" src="http://joel.neubeck.net/wp-content/uploads/2008/07/redbull_bulls-300x110.png" alt="" width="300" height="110" /></a>This f8 Terralever was selected by Red Bull as one of only a handful of launch partners that would have the opportunity to integrate Facebook Connect (announced  during the keynote) with some of their properties.  As you can imagine were were very excited about this opportunity, and more excited about what Connect will mean to all of our clients.</p>
<p>For those unfamiliar with the announcement, Facebook connect gives  external website the ability to integrate Facebook users  directly into there site.  This integration, allows a site to extend its user bases from those that already exist, to any of the over 100 million Facebook users.  With this integration a site instantly has access to customizing content based on that users profile, and even more important, that users entire social graph. Imagine the possibilities.</p>
<p>So what does this mean to Red Bull?   Below you we see a screen shot of a new and exciting interface that the team at Terralever has created for <a title="Red Bull USA" href="http://www.redbullusa.com" target="_blank">www.redbullusa.com</a>.  This interface leverages connect as a way to change the way in which users view content.</p>
<p><a href="http://joel.neubeck.net/wp-content/uploads/2008/07/picture-3.png"><img class="aligncenter size-medium wp-image-211" title="picture-3" src="http://joel.neubeck.net/wp-content/uploads/2008/07/picture-3-300x189.png" alt="" width="300" height="189" /></a><br style="clear:both" /></p>
<p>The team at Terralever did an amazing job at producing this example.  In just a few weeks we took four disparate sites (surfing, skating, skiing, and snowboarding), and aggregated each sites content and comments, into Red Bull USA.  The really cool part is that using Connect, we can now allow users the ability to read and comment on content they may never have stumbled upon.  Look for this to all go live some time this summer.</p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2008/07/facebook-f8/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Security lapse exposes Facebook photos</title>
		<link>http://joel.neubeck.net/2008/03/security-lapse-exposes-facebook-photos/</link>
		<comments>http://joel.neubeck.net/2008/03/security-lapse-exposes-facebook-photos/#comments</comments>
		<pubDate>Tue, 25 Mar 2008 19:54:16 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Privacy]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/2008/03/security-lapse-exposes-facebook-photos/</guid>
		<description><![CDATA[Check out this article on Cnn that describes the recent privacy breach that caught Facebook with there pants down.  A security lapse allowed strangers to access photos of Facebook member and their friends, even if the privacy settings were set to restrict who could see the photos. With over 67 million active users, Facebook will [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://joel.neubeck.net/wp-content/uploads/2008/03/welcome_3.gif" alt="welcome_3.gif" class="imageframe imgalignleft" height="90" width="190" />Check out this article on <a href="http://www.cnn.com/2008/TECH/03/25/facebook.security.ap/index.html" title=" Security lapse exposes Facebook photos" target="_blank">Cnn</a> that describes the recent privacy breach that caught Facebook with there pants down.  A security lapse allowed strangers to access photos of Facebook member and their friends, even if the privacy settings were set to restrict who could see the photos.</p>
<p>With over 67 million active users, Facebook will always be suspect to hackers looking for a way to circumvent its user privacy.  For reasons beyond my comprehension, our generation of Internet users have little trepidation about what information we place in the hands of others.   When Facebook made the decision to open ups its platform they put upon them self a huge risk that someday the breach will be very serious.   Privacy is not a setting, but a caution we should all take before we choose to upload a private photo or other personal information to the 5th most-trafficked website in the world .</p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2008/03/security-lapse-exposes-facebook-photos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Faceboook Backs off &#8220;Beacon&#8221;</title>
		<link>http://joel.neubeck.net/2007/11/facebook-backs-off-beacon/</link>
		<comments>http://joel.neubeck.net/2007/11/facebook-backs-off-beacon/#comments</comments>
		<pubDate>Fri, 30 Nov 2007 17:16:49 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Industry]]></category>
		<category><![CDATA[facebook]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/2007/11/facebook-backs-off-beacon/</guid>
		<description><![CDATA[This morning Facebook announced that it has made some significant changes to its new advertising program called Beacon to give its users better control over how their online purchases might be broadcast to that users Facebook friends. Tens of thousands of users have been complaining that there personal privacy has been compromised when Facebooks began [...]]]></description>
			<content:encoded><![CDATA[<p>This morning Facebook announced that it has made some significant changes to its new advertising program called Beacon to give its users better control over how their online purchases might be broadcast to that users Facebook friends.  Tens of thousands of users have been complaining that there personal privacy has been compromised when Facebooks began circulating potentially sensitive information about their online purchases with various websites.  These sites such as BlockBuster, and Overstock and Amazon.com began embedding code in their pages to track transactions made by Facebook users.</p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2007/11/facebook-backs-off-beacon/feed/</wfw:commentRss>
		<slash:comments>0</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>Ganging Up on Facebook</title>
		<link>http://joel.neubeck.net/2007/10/ganging-up-on-facebook/</link>
		<comments>http://joel.neubeck.net/2007/10/ganging-up-on-facebook/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 18:44:51 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Industry]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/2007/10/ganging-up-on-facebook/</guid>
		<description><![CDATA[Yesterday I read this interesting article titled Google and Friends to Gang Up on Facebook. The basis of the article was Google’s new alliances, which they hope will give them a way to take on Facebook. Specifically, Facebook’s recent decision to allow developers the ability to write against the Facebook platform API. The article states [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.google.com" title="1_google_logo.jpg"><img width="100" src="http://joel.neubeck.net/wp-content/uploads/2007/10/1_google_logo.jpg" alt="1_google_logo.jpg" height="70" class="imageframe imgalignleft" /></a>Yesterday I read this interesting article titled <a href="http://www.nytimes.com/2007/10/31/technology/31google.html?_r=2&amp;oref=slogin&amp;oref=slogin">Google and Friends to Gang Up on Facebook</a>. The basis of the article was Google’s new alliances, which they hope will give them a way to take on Facebook. Specifically, Facebook’s recent decision to allow developers the ability to write against the Facebook platform API. The article states that Google will &#8220;introduce a common set of standards to allow software developers to write programs for Google’s social network, Orkut as well as others, including LinkedIn, hi5, Friendster, Plaxo and Ning.&#8221; As a software engineer I am fascinated by the potential this has for creating valuable applications that have both social networking value as well as business productivity value.</p>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2007/10/ganging-up-on-facebook/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>
		<item>
		<title>Facebook &lt;fbml:ref../&gt;</title>
		<link>http://joel.neubeck.net/2007/10/facebook-fbml-ref/</link>
		<comments>http://joel.neubeck.net/2007/10/facebook-fbml-ref/#comments</comments>
		<pubDate>Wed, 03 Oct 2007 20:14:01 +0000</pubDate>
		<dc:creator>joel</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[fbml]]></category>
		<category><![CDATA[fbml:ref]]></category>

		<guid isPermaLink="false">http://joel.neubeck.net/2007/10/facebook/</guid>
		<description><![CDATA[For those of you who have embarked on writing a Facebook app, you may have faced the challenge of how to automatically update your profile fbml without forcing a user to take action. The approach I have found most effective is to use the &#60;fbml:ref&#62; tag. Facebook defines this command as a tag which &#8220;fetches [...]]]></description>
			<content:encoded><![CDATA[<p>For those of you who have embarked on writing a Facebook app, you may have faced the challenge of how to automatically update your profile fbml without forcing a user to take action. The approach I have found most effective is to use the &lt;fbml:ref&gt; tag. Facebook defines this command as a tag which &#8220;fetches and renders FBML from a given ref source – either a ref string &#8220;handle&#8221; you&#8217;ve created using fbml.setRefHandle or a URL that serves FBML. &#8221; When using “fbml.setRefHandle” Facebook stores this FBML on its servers in the form of a hashtable. Using a single push we can update FBML for all users that have our application installed.</p>
<p>For a recent client we were asked to display the first few entries from a RSS feed within a users profile. All Facebook users would see the same entries, until the RSS feed changed. Here is the PHP we used to set a users FBML.</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
14
15
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> render_ref_fbml<span style="color: #009900;">&#40;</span><span style="color: #000088;">$uid</span><span style="color: #339933;">,</span> <span style="color: #000088;">$rssItems</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
  <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$facebook</span><span style="color: #339933;">;</span> 
  try <span style="color: #009900;">&#123;</span> 
    <span style="color: #666666; font-style: italic;">// Set FBML Cache </span>
    <span style="color: #000088;">$refFbml</span> <span style="color: #339933;">=</span> render_narrow_fbml<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #339933;">,</span> <span style="color: #000088;">$rssItems</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
    <span style="color: #000088;">$refFbml</span> <span style="color: #339933;">.=</span> render_wide_fbml<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #339933;">,</span> <span style="color: #000088;">$rssItems</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
    <span style="color: #000088;">$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_setRefHandle</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'RssFbml'</span><span style="color: #339933;">,</span><span style="color: #000088;">$refFbml</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
    <span style="color: #666666; font-style: italic;">// Set Profile FBML </span>
    <span style="color: #000088;">$fbml</span> <span style="color: #339933;">=</span> render_css_style<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
    <span style="color: #000088;">$fbml</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;fb:ref handle=&quot;RssFbml&quot;&gt;'</span><span style="color: #339933;">;</span> 
    <span style="color: #000088;">$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;">profile_setFBML</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$fbml</span><span style="color: #339933;">,</span> <span style="color: #000088;">$uid</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
    <span style="color: #009900;">&#125;</span> catch <span style="color: #009900;">&#40;</span>Exception <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
      <span style="color: #990000;">error_log</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$e</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMessage</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>

<p>In a standalone php file we then created a similar function which updated only the FBML stored under the “RssFbml” handle.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> render_ref<span style="color: #009900;">&#40;</span><span style="color: #000088;">$rssItems</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
  <span style="color: #000000; font-weight: bold;">global</span> <span style="color: #000088;">$facebook</span><span style="color: #339933;">;</span> 
  try <span style="color: #009900;">&#123;</span> 
    <span style="color: #666666; font-style: italic;">// Set FBML Cache </span>
    <span style="color: #000088;">$refFbml</span> <span style="color: #339933;">=</span> render_narrow_fbml<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$rssItems</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
    <span style="color: #000088;">$refFbml</span> <span style="color: #339933;">.=</span> render_wide_fbml<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #000088;">$rssItems</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
    <span style="color: #000088;">$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_setRefHandle</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'RssFbml'</span><span style="color: #339933;">,</span><span style="color: #000088;">$refFbml</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
  <span style="color: #009900;">&#125;</span> catch <span style="color: #009900;">&#40;</span>Exception <span style="color: #000088;">$e</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
    <span style="color: #990000;">error_log</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$e</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getMessage</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>

<p>This php file uses an infinite Facebook session and is called every 30 min by a CRON job.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #cc66cc;">30</span> <span style="color: #339933;">*</span> <span style="color: #339933;">*</span> <span style="color: #339933;">*</span> <span style="color: #339933;">*</span> php <span style="color: #339933;">-</span>f <span style="color: #339933;">/</span><span style="color: #000000; font-weight: bold;">var</span><span style="color: #339933;">/</span>www<span style="color: #339933;">/</span>rss<span style="color: #339933;">.</span>php</pre></td></tr></table></div>

<p></fb:ref></pre>
]]></content:encoded>
			<wfw:commentRss>http://joel.neubeck.net/2007/10/facebook-fbml-ref/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

