Hey Dustin,<br><br>This is sounding a little familiar.&nbsp; I am wondering if someone the facebook_session in your sessions table( you are using db sessions right? )&nbsp; doesn&#39;t have a user for some reason.&nbsp;&nbsp; Can you blow away your session table and see if things get better?<br>
<br>And also something isn&#39;t making sense here,&nbsp; you say that facebook_session doesn&#39;t return anything?&nbsp; But them you say @user is nil?&nbsp; If facebook_session was nil then you would blow up before setting @user, right?<br>
<br>Dave<br><br><div class="gmail_quote">On Sun, Apr 27, 2008 at 7:06 PM, Dustin Anderson &lt;<a href="mailto:dustin@dustinanderson.com">dustin@dustinanderson.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hey Dave, I&#39;m definitely calling<br>
ensure_application_is_installed_by_facebook_user in application.rb -<br>
so if I hit the server directly (e.g. localhost:3000), it sends me to<br>
a &quot;You&#39;ve already installed this app&quot; page.<br>
<br>
Anyway, thanks Dave, but it must be something else... any other ideas?<br>
<br>
Thanks again for all the help.<br>
<font color="#888888">Dustin<br>
</font><div><div></div><div class="Wj3C7c"><br>
On Sun, Apr 27, 2008 at 3:12 PM, David Clements<br>
&lt;<a href="mailto:david.g.clements@gmail.com">david.g.clements@gmail.com</a>&gt; wrote:<br>
&gt; I don&#39;t have the book in front if me, but are you calling one of the ensure<br>
&gt; methods? &nbsp;Facebook_session will return nil unless you have authenticted to<br>
&gt; facebook.<br>
&gt;<br>
&gt; &nbsp;Dave<br>
&gt;<br>
&gt; &nbsp;Sent from my iPhone<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; &nbsp;On Apr 27, 2008, at 9:13 AM, &quot;Dustin Anderson&quot; &lt;<a href="mailto:dustin@dustinanderson.com">dustin@dustinanderson.com</a>&gt;<br>
&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; &gt; Thanks Ken,<br>
&gt; &gt;<br>
&gt; &gt; I could be wrong, but I&#39;m pretty sure that facebook_session is being<br>
&gt; &gt; defined on page 50 in the book so that it can be accessed in the<br>
&gt; &gt; Model. &nbsp;In my case, I&#39;m just trying to call it from the controller...<br>
&gt; &gt; so I should be able to call facebook_session in the controller ( I<br>
&gt; &gt; think)?<br>
&gt; &gt;<br>
&gt; &gt; Any other ideas?<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; On Sat, Apr 26, 2008 at 10:28 PM, Ken Schroeder &lt;<a href="mailto:schroeder.ken@gmail.com">schroeder.ken@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt; &gt;<br>
&gt; &gt; &gt; Do you have the facebook_session method defined?<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; From pg 50 from Mike&#39;s latest release.<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; def facebook_session<br>
&gt; &gt; &gt; &nbsp;@facebook_session ||=<br>
&gt; &gt; &gt; &nbsp;returning Facebooker::Session.create do |session|<br>
&gt; &gt; &gt; &nbsp; session.secure_with!(session_key,facebook_id,1.day.from_now)<br>
&gt; &gt; &gt; &nbsp; end<br>
&gt; &gt; &gt; end<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; On Sat, Apr 26, 2008 at 10:22 PM, Dustin Anderson<br>
&gt; &gt; &gt; &lt;<a href="mailto:dustin@dustinanderson.com">dustin@dustinanderson.com</a>&gt; wrote:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Hey All,<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; I can&#39;t get facebook_session to return anything but nil.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; I&#39;m following along in Mike Mangino&#39;s pragmatic programmer&#39;s book<br>
&gt; &gt; &gt; &gt; about creating invitations - and adding info to a profile...<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; There is a part where we are supposed to grab the @user to be able to<br>
&gt; &gt; &gt; &gt; set the profile_fbml on it.<br>
&gt; &gt; &gt; &gt; @user = facebook_session.user<br>
&gt; &gt; &gt; &gt; @user.profile_fbml = render_to_string(:partial=&gt;&quot;profile&quot;,<br>
&gt; &gt; &gt; &gt; :locals=&gt;{:from=&gt;params[:from]})<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Anyway, it never worked for me... I did an @user.inspect and it&#39;s just<br>
&gt; &gt; &gt; &gt; nil. &nbsp;facebook_session doesn&#39;t return anything.<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Any ideas?<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt; Thanks in advance!<br>
&gt; &gt; &gt; &gt; Dustin<br>
&gt; &gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; &gt; Facebooker-talk mailing list<br>
&gt; &gt; &gt; &gt; <a href="mailto:Facebooker-talk@rubyforge.org">Facebooker-talk@rubyforge.org</a><br>
&gt; &gt; &gt; &gt; <a href="http://rubyforge.org/mailman/listinfo/facebooker-talk" target="_blank">http://rubyforge.org/mailman/listinfo/facebooker-talk</a><br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; Facebooker-talk mailing list<br>
&gt; &gt; &gt; <a href="mailto:Facebooker-talk@rubyforge.org">Facebooker-talk@rubyforge.org</a><br>
&gt; &gt; &gt; <a href="http://rubyforge.org/mailman/listinfo/facebooker-talk" target="_blank">http://rubyforge.org/mailman/listinfo/facebooker-talk</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Facebooker-talk mailing list<br>
&gt; &gt; <a href="mailto:Facebooker-talk@rubyforge.org">Facebooker-talk@rubyforge.org</a><br>
&gt; &gt; <a href="http://rubyforge.org/mailman/listinfo/facebooker-talk" target="_blank">http://rubyforge.org/mailman/listinfo/facebooker-talk</a><br>
&gt; &gt;<br>
&gt;<br>
</div></div></blockquote></div><br>