Hey Dustin,<br><br>This is sounding a little familiar. I am wondering if someone the facebook_session in your sessions table( you are using db sessions right? ) doesn't have a user for some reason. Can you blow away your session table and see if things get better?<br>
<br>And also something isn't making sense here, you say that facebook_session doesn't return anything? But them you say @user is nil? 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 <<a href="mailto:dustin@dustinanderson.com">dustin@dustinanderson.com</a>> 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'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 "You've already installed this app" 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>
<<a href="mailto:david.g.clements@gmail.com">david.g.clements@gmail.com</a>> wrote:<br>
> I don't have the book in front if me, but are you calling one of the ensure<br>
> methods? Facebook_session will return nil unless you have authenticted to<br>
> facebook.<br>
><br>
> Dave<br>
><br>
> Sent from my iPhone<br>
><br>
><br>
><br>
> On Apr 27, 2008, at 9:13 AM, "Dustin Anderson" <<a href="mailto:dustin@dustinanderson.com">dustin@dustinanderson.com</a>><br>
> wrote:<br>
><br>
><br>
> > Thanks Ken,<br>
> ><br>
> > I could be wrong, but I'm pretty sure that facebook_session is being<br>
> > defined on page 50 in the book so that it can be accessed in the<br>
> > Model. In my case, I'm just trying to call it from the controller...<br>
> > so I should be able to call facebook_session in the controller ( I<br>
> > think)?<br>
> ><br>
> > Any other ideas?<br>
> ><br>
> ><br>
> ><br>
> > On Sat, Apr 26, 2008 at 10:28 PM, Ken Schroeder <<a href="mailto:schroeder.ken@gmail.com">schroeder.ken@gmail.com</a>><br>
> wrote:<br>
> ><br>
> > > Do you have the facebook_session method defined?<br>
> > ><br>
> > > From pg 50 from Mike's latest release.<br>
> > ><br>
> > > def facebook_session<br>
> > > @facebook_session ||=<br>
> > > returning Facebooker::Session.create do |session|<br>
> > > session.secure_with!(session_key,facebook_id,1.day.from_now)<br>
> > > end<br>
> > > end<br>
> > ><br>
> > ><br>
> > ><br>
> > > On Sat, Apr 26, 2008 at 10:22 PM, Dustin Anderson<br>
> > > <<a href="mailto:dustin@dustinanderson.com">dustin@dustinanderson.com</a>> wrote:<br>
> > ><br>
> > > ><br>
> > > ><br>
> > > ><br>
> > > > Hey All,<br>
> > > ><br>
> > > > I can't get facebook_session to return anything but nil.<br>
> > > ><br>
> > > > I'm following along in Mike Mangino's pragmatic programmer's book<br>
> > > > about creating invitations - and adding info to a profile...<br>
> > > ><br>
> > > > There is a part where we are supposed to grab the @user to be able to<br>
> > > > set the profile_fbml on it.<br>
> > > > @user = facebook_session.user<br>
> > > > @user.profile_fbml = render_to_string(:partial=>"profile",<br>
> > > > :locals=>{:from=>params[:from]})<br>
> > > ><br>
> > > > Anyway, it never worked for me... I did an @user.inspect and it's just<br>
> > > > nil. facebook_session doesn't return anything.<br>
> > > ><br>
> > > > Any ideas?<br>
> > > ><br>
> > > > Thanks in advance!<br>
> > > > Dustin<br>
> > > > _______________________________________________<br>
> > > > Facebooker-talk mailing list<br>
> > > > <a href="mailto:Facebooker-talk@rubyforge.org">Facebooker-talk@rubyforge.org</a><br>
> > > > <a href="http://rubyforge.org/mailman/listinfo/facebooker-talk" target="_blank">http://rubyforge.org/mailman/listinfo/facebooker-talk</a><br>
> > > ><br>
> > > ><br>
> > ><br>
> > ><br>
> > > _______________________________________________<br>
> > > Facebooker-talk mailing list<br>
> > > <a href="mailto:Facebooker-talk@rubyforge.org">Facebooker-talk@rubyforge.org</a><br>
> > > <a href="http://rubyforge.org/mailman/listinfo/facebooker-talk" target="_blank">http://rubyforge.org/mailman/listinfo/facebooker-talk</a><br>
> > ><br>
> > ><br>
> > ><br>
> > _______________________________________________<br>
> > Facebooker-talk mailing list<br>
> > <a href="mailto:Facebooker-talk@rubyforge.org">Facebooker-talk@rubyforge.org</a><br>
> > <a href="http://rubyforge.org/mailman/listinfo/facebooker-talk" target="_blank">http://rubyforge.org/mailman/listinfo/facebooker-talk</a><br>
> ><br>
><br>
</div></div></blockquote></div><br>