<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <title>rubyisbeautiful - facebooker plugin tutorial Comments</title>
  <id>tag:rubyisbeautiful.com,2009:/2008/1/27/facebooker-plugin-tutorial/comments</id>
  <generator version="0.7.3" uri="http://mephistoblog.com">Mephisto Noh-Varr</generator>
  <link href="http://rubyisbeautiful.com/2008/1/27/facebooker-plugin-tutorial/comments.xml" rel="self" type="application/atom+xml"/>
  <link href="/2008/1/27/facebooker-plugin-tutorial" rel="alternate" type="text/html"/>
  <updated>2008-02-11T15:07:53Z</updated>
  <entry xml:base="http://rubyisbeautiful.com/">
    <author>
      <name>David</name>
    </author>
    <id>tag:rubyisbeautiful.com,2008-01-27:41:55</id>
    <published>2008-02-11T15:07:53Z</published>
    <updated>2008-02-11T15:07:53Z</updated>
    <link href="http://rubyisbeautiful.com/2008/1/27/facebooker-plugin-tutorial" rel="alternate" type="text/html"/>
    <title>Comment on 'facebooker plugin tutorial' by David</title>
<content type="html">Hi Nick,

One thing you might wanna do wich, in my view, would be cleaner is to def a current_user method like this in application controller.

helper_method :facebook_session,:current_user

  def current_user 
   
    @current_user ||= User.find_or_create_by_facebook_uid(facebook_session.user.uid) if facebook_session 
  end 

this way, you can call current_user from anywhere you want and get it only when you need it. This is common practice for authentication in Rails.

thanks for the blog post.</content>  </entry>
  <entry xml:base="http://rubyisbeautiful.com/">
    <author>
      <name>bryan</name>
    </author>
    <id>tag:rubyisbeautiful.com,2008-01-27:41:54</id>
    <published>2008-02-11T10:33:55Z</published>
    <updated>2008-02-11T10:33:55Z</updated>
    <link href="http://rubyisbeautiful.com/2008/1/27/facebooker-plugin-tutorial" rel="alternate" type="text/html"/>
    <title>Comment on 'facebooker plugin tutorial' by bryan</title>
<content type="html">Hey Nick.  I played around with removing/changing the values in facebooker.rb.  As far as the security stuff goes, it seems definitely essential, as Facebook rejects the request without credentials.  
The other options tell facebooker where your callbacks are, as opposed to setting the same information in Facebook's app settings.  Removing for example the relative url root environment variable, links generated for the FB side become 404's.  My dev app is at &quot;apps.facebook.com/rubyisbeautiful&quot;
If I remove that env from the config, my links _as far as Facebook is concerned_ become &quot;apps.facebook.com&quot;
I checked again the rdocs for any updates, and they do seem dated.  The last doc change was Nov 2007 and the last code change was Feb 6th.  I'll regenerate the docs locally and post here for comparison.  check the comments for the link.  
Thanks!</content>  </entry>
  <entry xml:base="http://rubyisbeautiful.com/">
    <author>
      <name>bryan</name>
    </author>
    <id>tag:rubyisbeautiful.com,2008-01-27:41:51</id>
    <published>2008-02-08T10:43:10Z</published>
    <updated>2008-02-08T10:43:10Z</updated>
    <link href="http://rubyisbeautiful.com/2008/1/27/facebooker-plugin-tutorial" rel="alternate" type="text/html"/>
    <title>Comment on 'facebooker plugin tutorial' by bryan</title>
<content type="html">Hey thanks Nick.  I'll check it out and post an update.</content>  </entry>
  <entry xml:base="http://rubyisbeautiful.com/">
    <author>
      <name>Nick</name>
    </author>
    <id>tag:rubyisbeautiful.com,2008-01-27:41:43</id>
    <published>2008-02-08T01:25:54Z</published>
    <updated>2008-02-08T01:25:54Z</updated>
    <link href="http://rubyisbeautiful.com/2008/1/27/facebooker-plugin-tutorial" rel="alternate" type="text/html"/>
    <title>Comment on 'facebooker plugin tutorial' by Nick</title>
<content type="html">I think the part with config/initializers/facebooker.rb is not needed. Rdoc page must be out of date.</content>  </entry>
</feed>
