<?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>Hungry Machine &#187; Facebook</title>
	<atom:link href="http://blog.hungrymachine.com/tag/facebook/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hungrymachine.com</link>
	<description>The guys behind LivingSocial</description>
	<lastBuildDate>Sun, 25 Oct 2009 15:08:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The End of Slideshows: Animoto</title>
		<link>http://blog.hungrymachine.com/2008/05/13/the-end-of-slideshows-animoto/</link>
		<comments>http://blog.hungrymachine.com/2008/05/13/the-end-of-slideshows-animoto/#comments</comments>
		<pubDate>Tue, 13 May 2008 21:29:00 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[animoto]]></category>

		<guid isPermaLink="false">blog.hungrymachine.com/2008/11/13/the-end-of-slideshows-animoto</guid>
		<description><![CDATA[UPDATE:  Animoto just raised a round of  investment from Amazon! Congrats Guys! 
Animoto is a great idea.  They take your photos and create a production quality video to the music of your choice.  Its the end of those boring slide shows, for good.  


(From a recent Techcrunch article here)


We had [...]]]></description>
			<content:encoded><![CDATA[<p>UPDATE:  Animoto just raised a <a href="http://www.techcrunch.com/2008/05/15/amazon-funds-animoto-music-video-creator/">round of  investment</a> from Amazon! Congrats Guys! </p>
<p><a href="http://www.animoto.com">Animoto</a> is a great idea.  They take your photos and create a production quality video to the music of your choice.  Its the end of those boring slide shows, for good.  </p>
<p><div style="text-align: center;">
<object id="W47d804cf2a603f89" width="432" height="250" quality="high" data="http://widgets.clearspring.com/o/46928cc51133af17/47d804cf2a603f89" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="opaque"><param name="wmode" value="opaque" /><param name="movie" value="http://widgets.clearspring.com/o/46928cc51133af17/47d804cf2a603f89" /><param name="scaleMode" value="showAll" /><param name="allowNetworking" value="all" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="" /></object><br/><br />
<span style="font-size:10px">(From a recent Techcrunch article <a href="http://www.techcrunch.com/2008/03/12/animoto-rocks-automatically-turns-your-photos-into-a-music-video-slide-show/">here</a>)</span>
</div>
</p>
<p>We had the pleasure to work with the Animoto guys to launch their Facebook application, <a href="http://apps.facebook.com/animoto">&#8220;Animoto Videos&#8221;</a>, which leveraged all of the existing photos on Facebook. The growth was amazing.</p>
<div style="text-align:center">
<img src="http://www.allfacebook.com/images/animoto-screenshot.gif"/><br/><br />
<span style="font-size:10px">(From a recent AllFacebook article <a href="http://www.allfacebook.com/2008/03/animoto-challenges-slide-on-facebook/">here</a>)</span>
</div>
<p>Scaling an application from a few hundred users to over a million in just a few days isnt easy, but we had a great team.  Their backend rendering farm lived in Amazon&#8217;s Cloud, and the growth was so impressive, Jeff Bezos even spoke about them at Y Combinator’s <a href="http://www.startupschool.org/">Startup School</a> just a few weeks ago.  From 50 EC2 instances to over 4k in only a few days. See the video below.  </p>
<div style="text-align: center;">
<object width='520' height='276'><param name='movie' value='http://www.omnisio.com/bin/Embed.swf?embedID=b6gTwEirOr3zt0adbiFy2w&#038;autoPlay=0' /><param name='bgcolor' value='#FFFFFF' /><param name='quality' value='high' /><param name='allowscriptaccess' value='always' /><param name='allowfullscreen' value='true' /><embed type='application/x-shockwave-flash' name='omnisio_video_b6gTwEirOr3zt0adbiFy2w' src='http://www.omnisio.com/bin/Embed.swf?embedID=b6gTwEirOr3zt0adbiFy2w&#038;autoPlay=0' bgcolor='#FFFFFF' quality='high' allowfullscreen='true' allowscriptaccess='always' width='520' height='276' ><noembed>
<div><a href='http://www.omnisio.com'>Share and annotate your videos</a> with Omnisio!</div>
<p></noembed></embed></object>
</div>
<p> It was a pleasure working with the entire team from Animoto, RightScale, and Amazon.  See their blog posts about the application <a href="http://blog.animoto.com/2008/04/21/amazon-ceo-jeff-bezos-on-animoto/">here</a>,  <a href="http://blog.rightscale.com/2008/04/23/animoto-facebook-scale-up/">here</a>, and <a href="http://aws.typepad.com/aws/2008/04/animoto---scali.html">here</a>.  </p>
<p>I&#8217;m sure I&#8217;ll cross paths with many of you at RailsConf.  First round of beers is on me.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hungrymachine.com/2008/05/13/the-end-of-slideshows-animoto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Leverage Rails Resource Routes on Facebook</title>
		<link>http://blog.hungrymachine.com/2008/01/07/leverage-rails-resource-routes-on-facebook/</link>
		<comments>http://blog.hungrymachine.com/2008/01/07/leverage-rails-resource-routes-on-facebook/#comments</comments>
		<pubDate>Mon, 07 Jan 2008 21:57:00 +0000</pubDate>
		<dc:creator>eddie</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[routing]]></category>

		<guid isPermaLink="false">blog.hungrymachine.com/2008/02/16/leverage-rails-resource-routes-on-facebook</guid>
		<description><![CDATA[Since all canvas page views are proxied through POSTs, resource routes were hopelessly broken. The Facebook platform team was kind enough to add a new feature just for us rails folks: a new signed parameter that indicates the original request type (i.e. POST v. GET) against canvas pages.

Here&#8217;s a small patch you can stick at [...]]]></description>
			<content:encoded><![CDATA[<p>Since all canvas page views are proxied through POSTs, resource routes were hopelessly broken. The Facebook platform team was kind enough to add a new feature just for us rails folks: a new signed parameter that indicates the original request type (i.e. POST v. GET) against canvas pages.<br />
<br/><br/><br />
Here&#8217;s a small patch you can stick at the end of environment.rb to restore REST-ful routes.<br />
<br/><br/></p>
<pre class="textmate-source"><span class="source source_ruby"><span class="meta meta_class meta_class_ruby"><span class="keyword keyword_control keyword_control_class keyword_control_class_ruby">class</span> <span class="entity entity_name entity_name_type entity_name_type_class entity_name_type_class_ruby">ActionController::Routing::RouteSet</span></span>
  <span class="meta meta_function meta_function_method meta_function_method_with-arguments meta_function_method_with-arguments_ruby"><span class="keyword keyword_control keyword_control_def keyword_control_def_ruby">def</span> <span class="entity entity_name entity_name_function entity_name_function_ruby">extract_request_environment</span><span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_ruby">(</span><span class="variable variable_parameter variable_parameter_function variable_parameter_function_ruby">request</span><span class="punctuation punctuation_definition punctuation_definition_parameters punctuation_definition_parameters_ruby">)</span></span>
    contents <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby">=</span> request<span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>body<span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>read
    facebook_method_override <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby">=</span> <span class="constant constant_language constant_language_ruby">nil</span>
    <span class="keyword keyword_control keyword_control_ruby">if</span> contents <span class="keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_ruby">=~</span> <span class="string string_regexp string_regexp_classic string_regexp_classic_ruby"><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_ruby">/</span>fb_sig_request_method=<span class="string string_regexp string_regexp_group string_regexp_group_ruby"><span class="punctuation punctuation_definition punctuation_definition_group punctuation_definition_group_ruby">(</span><span class="string string_regexp string_regexp_character-class string_regexp_character-class_ruby"><span class="punctuation punctuation_definition punctuation_definition_character-class punctuation_definition_character-class_ruby">[</span>A-Z<span class="punctuation punctuation_definition punctuation_definition_character-class punctuation_definition_character-class_ruby">]</span></span>+<span class="punctuation punctuation_definition punctuation_definition_group punctuation_definition_group_ruby">)</span></span><span class="punctuation punctuation_definition punctuation_definition_string punctuation_definition_string_ruby">/</span></span>
      facebook_method_override <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby">=</span> <span class="variable variable_other variable_other_readwrite variable_other_readwrite_global variable_other_readwrite_global_pre-defined variable_other_readwrite_global_pre-defined_ruby"><span class="punctuation punctuation_definition punctuation_definition_variable punctuation_definition_variable_ruby">$</span>1</span>
    <span class="keyword keyword_control keyword_control_ruby">end</span>
    request<span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>body<span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>string <span class="keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby">=</span> contents
    <span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_ruby">{</span><span class="meta meta_syntax meta_syntax_ruby meta_syntax_ruby_start-block"> </span><span class="constant constant_other constant_other_symbol constant_other_symbol_ruby"><span class="punctuation punctuation_definition punctuation_definition_constant punctuation_definition_constant_ruby">:</span>method</span> <span class="punctuation punctuation_separator punctuation_separator_key-value">=&gt;</span> facebook_method_override <span class="keyword keyword_operator keyword_operator_comparison keyword_operator_comparison_ruby">?</span> facebook_method_override<span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>downcase<span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>intern <span class="punctuation punctuation_separator punctuation_separator_other punctuation_separator_other_ruby">:</span> request<span class="punctuation punctuation_separator punctuation_separator_method punctuation_separator_method_ruby">.</span>method<span class="punctuation punctuation_section punctuation_section_scope punctuation_section_scope_ruby">}</span>
  <span class="keyword keyword_control keyword_control_ruby">end</span>
<span class="keyword keyword_control keyword_control_ruby">end</span></span></pre>
<p><br/><br />
<b>UPDATE:</b> Here&#8217;s a slightly better implementation that allows the .get? and .post? helpers as well as a few other things to work (thanks Chris Nolan for reminding us to update this blog entry):<br/><br />
<br/></p>
<pre>
ActionController::AbstractRequest.class_eval do
  def request_method_with_facebook_overrides
    @request_method ||= begin
      case
        when parameters[:_method]
          parameters[:_method].downcase.to_sym
        when parameters[:fb_sig_request_method]
          parameters[:fb_sig_request_method].downcase.to_sym
        else
          request_method_without_facebook_overrides
      end
    end
  end
  alias_method_chain :request_method, :facebook_overrides
end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.hungrymachine.com/2008/01/07/leverage-rails-resource-routes-on-facebook/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Facebook lets money flow</title>
		<link>http://blog.hungrymachine.com/2007/10/22/facebook-lets-money-flow/</link>
		<comments>http://blog.hungrymachine.com/2007/10/22/facebook-lets-money-flow/#comments</comments>
		<pubDate>Mon, 22 Oct 2007 17:19:00 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[advertising]]></category>
		<category><![CDATA[amazon]]></category>
		<category><![CDATA[Facebook]]></category>

		<guid isPermaLink="false">blog.hungrymachine.com/2008/11/13/facebook-lets-money-flow</guid>
		<description><![CDATA[This morning the Chicago Tribune had an article entitled &#8220;Facebook lets money flow&#8221;, which among other recent articles, outlines something Facebook got right.  I spoke with the article&#8217;s author Eric Benderoff earlier in the week to discuss Hungry Machine&#8217;s monetization strategies on Facebook. 
While MySpace has allowed third party companies to embed widgets for [...]]]></description>
			<content:encoded><![CDATA[<p>This morning the Chicago Tribune had an article entitled <a href="http://www.chicagotribune.com/business/chi-mon_facebookoct22,0,7917547,full.story">&#8220;Facebook lets money flow&#8221;</a>, which among <a href="http://online.wsj.com/article_email/SB118886348147516379-lMyQjAxMDE3ODA4NDgwNjQzWj.html">other</a> <a href="http://money.cnn.com/2007/08/22/technology/facebook_economy.biz2/index.htm">recent</a> articles, outlines something Facebook got right.  I spoke with the article&#8217;s author Eric Benderoff earlier in the week to discuss Hungry Machine&#8217;s monetization strategies on Facebook. </p>
<p>While MySpace has allowed third party companies to embed widgets for quite some time, Facebook took it a step further and allowed full featured applications to reside &#8220;within&#8221; the Facebook experience, like the Social Shopping experience in <a href="apps.facebook.com/facebookshelf">Visual Bookshelf</a>. Most importantly, Facebook allowed these applications almost full control over the application experience. </p>
<p>Beyond selling our own display advertising across the social shopping suite and our 20+ other applications, we can provide advertisers the ability to leverage Social Data to target customers directly.  Social Data Demographics includes what user&#8217;s watch, read, listen to, and use.  Beyond the traditional demographics of age, sex, and location, social data takes that a step further.  </p>
<p>For example, the Harry Potter Book 7 in <a href="http://apps.facebook.com/facebookshelf/books/1537323/details">Visual Bookshelf</a> has 4x the number of book reviews as the same title on <a href="http://apps.facebook.com/facebookshelf/books/1537323/details">Amazon</a>. Hundreds of thousands of users have added books from the Harry Potter series to their bookshelves.  That community is active on Facebook. Why wouldn&#8217;t an advertiser want to target Harry Potter readers when the next Harry Potter movie comes out?   </p>
<p>This is the next phase of advertising in the social application space. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hungrymachine.com/2007/10/22/facebook-lets-money-flow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Driving installations to Facebook apps with testimonial banners</title>
		<link>http://blog.hungrymachine.com/2007/09/04/driving-installations-to-facebook-apps-with-testimonial-banners/</link>
		<comments>http://blog.hungrymachine.com/2007/09/04/driving-installations-to-facebook-apps-with-testimonial-banners/#comments</comments>
		<pubDate>Tue, 04 Sep 2007 16:12:00 +0000</pubDate>
		<dc:creator>eddie</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Biz]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[advertising]]></category>

		<guid isPermaLink="false">blog.hungrymachine.com/2007/09/04/driving-installations-to-facebook-apps-with-testimonial-banners</guid>
		<description><![CDATA[We&#8217;ve been helping partners promote their applications via sponsored cross-linking for a while now.  I recently had an idea that has been converting very well. I encourage you to give it a try, whether it&#8217;s with us or with somebody else.
It&#8217;s simple: combine a positive review from your application&#8217;s review wall, your 75&#215;75 directory [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been helping partners promote their applications via sponsored cross-linking for a while now.  I recently had an idea that has been converting very well. I encourage you to give it a try, whether it&#8217;s with us or with somebody else.</p>
<p>It&#8217;s simple: combine a positive review from your application&#8217;s review wall, your 75&#215;75 directory icon, and the facebook install button. The sample we&#8217;ve provided is for the neat <a href="http://www.facebook.com/apps/application.php?id=2376424094">My Music</a> application by our friends at <a href="http://www.qloud.com/beta_page.php">Qloud</a>.</p>
<p><img src="http://blog.hungrymachine.com/assets/2007/9/4/Picture_3_1.png" alt="Testimonial banner"/></p>
<p>On the publisher side, you should redirect clicks through a &#8216;reflector&#8217; so that you can track the clicks you&#8217;re generating.</p>
<p>On the advertiser&#8217;s side, you should provide a link to the publisher with a spot for the publisher to fill in the current user&#8217;s UID. The target of the link should log the clicking user and then redirect the user to the application. Later on, you can reconcile the referred users with your installed userbase to ascertain a conversion rate (and thus an eCPI&#8211;effective cost per install).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hungrymachine.com/2007/09/04/driving-installations-to-facebook-apps-with-testimonial-banners/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CNN/Business 2.0 picks up on the Facebook app buzz</title>
		<link>http://blog.hungrymachine.com/2007/08/24/cnn-business-2-0-picks-up-on-the-facebook-app-buzz/</link>
		<comments>http://blog.hungrymachine.com/2007/08/24/cnn-business-2-0-picks-up-on-the-facebook-app-buzz/#comments</comments>
		<pubDate>Fri, 24 Aug 2007 08:53:00 +0000</pubDate>
		<dc:creator>eddie</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Biz]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[CNN]]></category>
		<category><![CDATA[Visual Bookshelf]]></category>

		<guid isPermaLink="false">blog.hungrymachine.com/2008/11/13/cnn-business-2-0-picks-up-on-the-facebook-app-buzz</guid>
		<description><![CDATA[Minor mention of our Visual CD Rack, a sister app of our bigger bookshelf application&#8230;
Read the article

]]></description>
			<content:encoded><![CDATA[<p>Minor mention of our <a href="http://www.facebook.com/apps/application.php?api_key=0bd1c89fe5508b0f6a1518cc1c97cb20">Visual CD Rack</a>, a sister app of our bigger <a href="http://www.facebook.com/apps/application.php?api_key=044e19993aeee4f3eb7ae73bf0aa9321">bookshelf</a> application&#8230;<br/><br/><br />
<a href="http://money.cnn.com/2007/08/22/technology/facebook_economy.biz2/index.htm">Read the article</a><br />
<br/></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hungrymachine.com/2007/08/24/cnn-business-2-0-picks-up-on-the-facebook-app-buzz/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using mocks at the early stage of FB app development</title>
		<link>http://blog.hungrymachine.com/2007/08/15/using-mocks-at-the-early-stage-of-fb-app-development/</link>
		<comments>http://blog.hungrymachine.com/2007/08/15/using-mocks-at-the-early-stage-of-fb-app-development/#comments</comments>
		<pubDate>Wed, 15 Aug 2007 12:50:00 +0000</pubDate>
		<dc:creator>val</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[mock]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">blog.hungrymachine.com/2007/08/23/using-mocks-at-the-early-stage-of-fb-app-development</guid>
		<description><![CDATA[Developing applications for Facebook is a pain. The tunnel approach helps a lot to ease that pain but even then I prefer to start a FB app as a regular application, polish the logic, and then convert it to the Facebook one by adding FBML and such. At the early stages of the development I [...]]]></description>
			<content:encoded><![CDATA[<p>Developing applications for Facebook is a pain. <a href="http://rfacebook.rubyforge.org/tunnel.html">The tunnel approach</a> helps a lot to ease that pain but even then I prefer to start a FB app as a regular application, polish the logic, and then convert it to the Facebook one by adding <span class="caps">FBML</span> and such. At the early stages of the development I have the <em>mocked</em> parameter in <em>config/facebook.yml</em> set to <strong>true</strong> and keep this code in <em>config/initializers/facebook.rb</em>:</p>
<div class="CodeRay">
<div class="code">
<pre><span style="color:#036; font-weight:bold">PERSON_PROFILE_URL</span> = <span style="background-color:#fff0f0"><span style="color:#710">&quot;</span><span style="color:#D20">http://www.facebook.com/profile.php</span><span style="color:#710">&quot;</span></span>

<span style="color:#036; font-weight:bold">FACEBOOK_CONFIG</span> = <span style="color:#036; font-weight:bold">YAML</span>.load_file(<span style="background-color:#fff0f0"><span style="color:#710">&quot;</span><span style="background-color:#fff0f0"><span style="color:#710">#{</span><span style="color:#036; font-weight:bold">RAILS_ROOT</span><span style="color:#710">}</span></span><span style="color:#D20">/config/facebook.yml</span><span style="color:#710">&quot;</span></span>)[<span style="color:#036; font-weight:bold">RAILS_ENV</span>] || {}

<span style="color:#080; font-weight:bold">if</span> <span style="color:#036; font-weight:bold">FACEBOOK_CONFIG</span>[<span style="background-color:#fff0f0"><span style="color:#710">'</span><span style="color:#D20">mocked</span><span style="color:#710">'</span></span>]

  <span style="color:#080; font-weight:bold">class</span> <span style="color:#B06; font-weight:bold">Facebook::FBMLController</span>

    require <span style="background-color:#fff0f0"><span style="color:#710">'</span><span style="color:#D20">ostruct</span><span style="color:#710">'</span></span>
    <span style="color:#036; font-weight:bold">FB_SESSION</span> = <span style="color:#036; font-weight:bold">OpenStruct</span>.new(<span style="color:#A60">:session_user_id</span> =&gt; <span style="color:#00D; font-weight:bold">1</span>, <span style="color:#A60">:session_key</span> =&gt; <span style="background-color:#fff0f0"><span style="color:#710">&quot;</span><span style="color:#D20">12345</span><span style="color:#710">&quot;</span></span>, <span style="color:#A60">:is_valid?</span> =&gt; <span style="color:#038; font-weight:bold">true</span>)

    <span style="color:#080; font-weight:bold">def</span> <span style="color:#06B; font-weight:bold">fbsession</span>; <span style="color:#036; font-weight:bold">FB_SESSION</span>; <span style="color:#080; font-weight:bold">end</span>

    <span style="color:#080; font-weight:bold">def</span> <span style="color:#06B; font-weight:bold">require_facebook_install</span>; <span style="color:#038; font-weight:bold">true</span>; <span style="color:#080; font-weight:bold">end</span>

    <span style="color:#080; font-weight:bold">def</span> <span style="color:#06B; font-weight:bold">redirect_to</span>(url); <span style="color:#080; font-weight:bold">super</span>; <span style="color:#080; font-weight:bold">end</span>

    <span style="color:#080; font-weight:bold">def</span> <span style="color:#06B; font-weight:bold">url_for</span>(*params); <span style="color:#080; font-weight:bold">super</span>; <span style="color:#080; font-weight:bold">end</span>

  <span style="color:#080; font-weight:bold">end</span>

  <span style="color:#080; font-weight:bold">module</span> <span style="color:#B06; font-weight:bold">Facebook::Acts::FbUser</span>
    <span style="color:#080; font-weight:bold">module</span> <span style="color:#B06; font-weight:bold">InstanceMethods</span>
      <span style="color:#080; font-weight:bold">def</span> <span style="color:#06B; font-weight:bold">friends</span>
        (<span style="color:#038; font-weight:bold">self</span>.class.find(<span style="color:#A60">:all</span>) - [ <span style="color:#038; font-weight:bold">self</span> ]).collect(&amp;<span style="color:#A60">:uid</span>)
      <span style="color:#080; font-weight:bold">end</span>
    <span style="color:#080; font-weight:bold">end</span>
  <span style="color:#080; font-weight:bold">end</span>

<span style="color:#080; font-weight:bold">end</span></pre>
</div>
</div>
<p>It mocks out just enough of <a href="http://code.google.com/p/facebook-rails/">Facebook on Rails</a> functionality to use <em>FBMLController</em> and <em>acts_as_fb_user</em> from the beginning without Facebook backend.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hungrymachine.com/2007/08/15/using-mocks-at-the-early-stage-of-fb-app-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Routing to the initial action after facebook application install</title>
		<link>http://blog.hungrymachine.com/2007/08/14/routing-to-the-initial-action-after-facebook-application-install/</link>
		<comments>http://blog.hungrymachine.com/2007/08/14/routing-to-the-initial-action-after-facebook-application-install/#comments</comments>
		<pubDate>Tue, 14 Aug 2007 23:17:00 +0000</pubDate>
		<dc:creator>val</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">blog.hungrymachine.com/2007/08/17/routing-to-the-initial-action-after-facebook-application-install</guid>
		<description><![CDATA[Some facebook applications might have multiple entries. For example, a user might be adding an application (action &#8211; new) or replying to an invitation (action &#8211; reply, param &#8211; id). Since the UI for Facebook application configuration allows to provide only static Post-Add URL it might seem like there is no way to route users [...]]]></description>
			<content:encoded><![CDATA[<p>Some facebook applications might have multiple entries. For example, a user might be adding an application (action &#8211; <em>new</em>) or replying to an invitation (action &#8211; <em>reply</em>, param &#8211; <em>id</em>). Since the UI for Facebook application configuration allows to provide only static <em>Post-Add <span class="caps">URL</span></em> it might seem like there is no way to route users back to the original action if they tried to reach when the application has not been installed for them. Luckily, we have full control on the destination via the <em>next</em> paramater of the post install <span class="caps">URL</span>. All we need is to build a <span class="caps">URL</span> using the incoming call parameters with the exclusion of Facebook-specific ones.</p>
<p>This is an example for <a href="http://code.google.com/p/facebook-rails/">Facebook on Rails</a> based code that might go to the application controller:</p>
<div class="CodeRay">
<div class="code">
<pre><span style="color:#080; font-weight:bold">class</span> <span style="color:#B06; font-weight:bold">ApplicationController</span> &lt; <span style="color:#036; font-weight:bold">Facebook</span>::<span style="color:#036; font-weight:bold">FBMLController</span>

protected

  before_filter <span style="color:#A60">:require_facebook_install</span>

  <span style="color:#080; font-weight:bold">def</span> <span style="color:#06B; font-weight:bold">require_facebook_install</span>
    <span style="color:#080; font-weight:bold">if</span> in_canvas? &amp;&amp; !fbsession.is_valid?
      redirect_to fbsession.get_install_url(<span style="color:#A60">:next</span> =&gt; url_for(post_install_params))
      <span style="color:#038; font-weight:bold">false</span>
    <span style="color:#080; font-weight:bold">end</span>
  <span style="color:#080; font-weight:bold">end</span>

  <span style="color:#080; font-weight:bold">def</span> <span style="color:#06B; font-weight:bold">post_install_params</span>
    params.merge(<span style="color:#A60">:init</span> =&gt; <span style="color:#038; font-weight:bold">true</span>).delete_if { |k, v| k.starts_with?(<span style="background-color:#fff0f0"><span style="color:#710">'</span><span style="color:#D20">fb_sig</span><span style="color:#710">'</span></span>) }
  <span style="color:#080; font-weight:bold">end</span>

<span style="color:#080; font-weight:bold">end</span></pre>
</div>
</div>
<p>Notice that the code sets the <em>init</em> parameter so it <a href="indentifying-users-who-just-installed-your-facebook-apps">can be used to identify a post install call</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hungrymachine.com/2007/08/14/routing-to-the-initial-action-after-facebook-application-install/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Indentifying users who just installed your facebook apps</title>
		<link>http://blog.hungrymachine.com/2007/08/14/indentifying-users-who-just-installed-your-facebook-apps/</link>
		<comments>http://blog.hungrymachine.com/2007/08/14/indentifying-users-who-just-installed-your-facebook-apps/#comments</comments>
		<pubDate>Tue, 14 Aug 2007 23:13:00 +0000</pubDate>
		<dc:creator>val</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">blog.hungrymachine.com/2007/08/24/indentifying-users-who-just-installed-your-facebook-apps</guid>
		<description><![CDATA[Sometimes it is useful to do some action on a Facebook user right after your application has been installed by the user. For example, you might want to push some default FBML to user&#8217;s profile in case he does not complete the action you expect him to do after installation. Facebook application configuration allows to [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it is useful to do some action on a Facebook user right after your application has been installed by the user. For example, you might want to push some default <span class="caps">FBML</span> to user&#8217;s profile in case he does not complete the action you expect him to do after installation. Facebook application configuration allows to provide <em>Post-Add <span class="caps">URL</span></em> to route users to the destination url after the application install. It could be a dedicated <em>post_add</em> action or, in case of a default action where you have some code in the controller and since Facebook limits amount of redirects you can use, it could be a parameter to the url, like <code>&#38;init=true</code>, used to identify that it was a post-install action and execute on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hungrymachine.com/2007/08/14/indentifying-users-who-just-installed-your-facebook-apps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
