Dustin Anderson
2008-Apr-27 02:22 UTC
[Facebooker-talk] facebook_session not working for me
Hey All, I can''t get facebook_session to return anything but nil. I''m following along in Mike Mangino''s pragmatic programmer''s book about creating invitations - and adding info to a profile... There is a part where we are supposed to grab the @user to be able to set the profile_fbml on it. @user = facebook_session.user @user.profile_fbml = render_to_string(:partial=>"profile", :locals=>{:from=>params[:from]}) Anyway, it never worked for me... I did an @user.inspect and it''s just nil. facebook_session doesn''t return anything. Any ideas? Thanks in advance! Dustin
Do you have the facebook_session method defined?>From pg 50 from Mike''s latest release.def facebook_session @facebook_session || returning Facebooker::Session.create do |session| session.secure_with!(session_key,facebook_id,1.day.from_now) end end On Sat, Apr 26, 2008 at 10:22 PM, Dustin Anderson <dustin at dustinanderson.com> wrote:> Hey All, > > I can''t get facebook_session to return anything but nil. > > I''m following along in Mike Mangino''s pragmatic programmer''s book > about creating invitations - and adding info to a profile... > > There is a part where we are supposed to grab the @user to be able to > set the profile_fbml on it. > @user = facebook_session.user > @user.profile_fbml = render_to_string(:partial=>"profile", > :locals=>{:from=>params[:from]}) > > Anyway, it never worked for me... I did an @user.inspect and it''s just > nil. facebook_session doesn''t return anything. > > Any ideas? > > Thanks in advance! > Dustin > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20080426/e75d6bab/attachment.html>
Dustin Anderson
2008-Apr-27 15:13 UTC
[Facebooker-talk] facebook_session not working for me
Thanks Ken, I could be wrong, but I''m pretty sure that facebook_session is being defined on page 50 in the book so that it can be accessed in the Model. In my case, I''m just trying to call it from the controller... so I should be able to call facebook_session in the controller ( I think)? Any other ideas? On Sat, Apr 26, 2008 at 10:28 PM, Ken Schroeder <schroeder.ken at gmail.com> wrote:> Do you have the facebook_session method defined? > > From pg 50 from Mike''s latest release. > > def facebook_session > @facebook_session ||> returning Facebooker::Session.create do |session| > session.secure_with!(session_key,facebook_id,1.day.from_now) > end > end > > > > On Sat, Apr 26, 2008 at 10:22 PM, Dustin Anderson > <dustin at dustinanderson.com> wrote: > > > > > > > > Hey All, > > > > I can''t get facebook_session to return anything but nil. > > > > I''m following along in Mike Mangino''s pragmatic programmer''s book > > about creating invitations - and adding info to a profile... > > > > There is a part where we are supposed to grab the @user to be able to > > set the profile_fbml on it. > > @user = facebook_session.user > > @user.profile_fbml = render_to_string(:partial=>"profile", > > :locals=>{:from=>params[:from]}) > > > > Anyway, it never worked for me... I did an @user.inspect and it''s just > > nil. facebook_session doesn''t return anything. > > > > Any ideas? > > > > Thanks in advance! > > Dustin > > _______________________________________________ > > Facebooker-talk mailing list > > Facebooker-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > >
Dustin Anderson
2008-Apr-28 01:06 UTC
[Facebooker-talk] facebook_session not working for me
Hey Dave, I''m definitely calling ensure_application_is_installed_by_facebook_user in application.rb - so if I hit the server directly (e.g. localhost:3000), it sends me to a "You''ve already installed this app" page. Anyway, thanks Dave, but it must be something else... any other ideas? Thanks again for all the help. Dustin On Sun, Apr 27, 2008 at 3:12 PM, David Clements <david.g.clements at gmail.com> wrote:> I don''t have the book in front if me, but are you calling one of the ensure > methods? Facebook_session will return nil unless you have authenticted to > facebook. > > Dave > > Sent from my iPhone > > > > On Apr 27, 2008, at 9:13 AM, "Dustin Anderson" <dustin at dustinanderson.com> > wrote: > > > > Thanks Ken, > > > > I could be wrong, but I''m pretty sure that facebook_session is being > > defined on page 50 in the book so that it can be accessed in the > > Model. In my case, I''m just trying to call it from the controller... > > so I should be able to call facebook_session in the controller ( I > > think)? > > > > Any other ideas? > > > > > > > > On Sat, Apr 26, 2008 at 10:28 PM, Ken Schroeder <schroeder.ken at gmail.com> > wrote: > > > > > Do you have the facebook_session method defined? > > > > > > From pg 50 from Mike''s latest release. > > > > > > def facebook_session > > > @facebook_session ||> > > returning Facebooker::Session.create do |session| > > > session.secure_with!(session_key,facebook_id,1.day.from_now) > > > end > > > end > > > > > > > > > > > > On Sat, Apr 26, 2008 at 10:22 PM, Dustin Anderson > > > <dustin at dustinanderson.com> wrote: > > > > > > > > > > > > > > > > > > > Hey All, > > > > > > > > I can''t get facebook_session to return anything but nil. > > > > > > > > I''m following along in Mike Mangino''s pragmatic programmer''s book > > > > about creating invitations - and adding info to a profile... > > > > > > > > There is a part where we are supposed to grab the @user to be able to > > > > set the profile_fbml on it. > > > > @user = facebook_session.user > > > > @user.profile_fbml = render_to_string(:partial=>"profile", > > > > :locals=>{:from=>params[:from]}) > > > > > > > > Anyway, it never worked for me... I did an @user.inspect and it''s just > > > > nil. facebook_session doesn''t return anything. > > > > > > > > Any ideas? > > > > > > > > Thanks in advance! > > > > Dustin > > > > _______________________________________________ > > > > Facebooker-talk mailing list > > > > Facebooker-talk at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > _______________________________________________ > > > Facebooker-talk mailing list > > > Facebooker-talk at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > _______________________________________________ > > Facebooker-talk mailing list > > Facebooker-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > >
David Clements
2008-Apr-28 16:21 UTC
[Facebooker-talk] facebook_session not working for me
Hey Dustin, 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? 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? Dave On Sun, Apr 27, 2008 at 7:06 PM, Dustin Anderson <dustin at dustinanderson.com> wrote:> Hey Dave, I''m definitely calling > ensure_application_is_installed_by_facebook_user in application.rb - > so if I hit the server directly (e.g. localhost:3000), it sends me to > a "You''ve already installed this app" page. > > Anyway, thanks Dave, but it must be something else... any other ideas? > > Thanks again for all the help. > Dustin > > On Sun, Apr 27, 2008 at 3:12 PM, David Clements > <david.g.clements at gmail.com> wrote: > > I don''t have the book in front if me, but are you calling one of the > ensure > > methods? Facebook_session will return nil unless you have authenticted > to > > facebook. > > > > Dave > > > > Sent from my iPhone > > > > > > > > On Apr 27, 2008, at 9:13 AM, "Dustin Anderson" < > dustin at dustinanderson.com> > > wrote: > > > > > > > Thanks Ken, > > > > > > I could be wrong, but I''m pretty sure that facebook_session is being > > > defined on page 50 in the book so that it can be accessed in the > > > Model. In my case, I''m just trying to call it from the controller... > > > so I should be able to call facebook_session in the controller ( I > > > think)? > > > > > > Any other ideas? > > > > > > > > > > > > On Sat, Apr 26, 2008 at 10:28 PM, Ken Schroeder < > schroeder.ken at gmail.com> > > wrote: > > > > > > > Do you have the facebook_session method defined? > > > > > > > > From pg 50 from Mike''s latest release. > > > > > > > > def facebook_session > > > > @facebook_session ||> > > > returning Facebooker::Session.create do |session| > > > > session.secure_with!(session_key,facebook_id,1.day.from_now) > > > > end > > > > end > > > > > > > > > > > > > > > > On Sat, Apr 26, 2008 at 10:22 PM, Dustin Anderson > > > > <dustin at dustinanderson.com> wrote: > > > > > > > > > > > > > > > > > > > > > > > > Hey All, > > > > > > > > > > I can''t get facebook_session to return anything but nil. > > > > > > > > > > I''m following along in Mike Mangino''s pragmatic programmer''s book > > > > > about creating invitations - and adding info to a profile... > > > > > > > > > > There is a part where we are supposed to grab the @user to be able > to > > > > > set the profile_fbml on it. > > > > > @user = facebook_session.user > > > > > @user.profile_fbml = render_to_string(:partial=>"profile", > > > > > :locals=>{:from=>params[:from]}) > > > > > > > > > > Anyway, it never worked for me... I did an @user.inspect and it''s > just > > > > > nil. facebook_session doesn''t return anything. > > > > > > > > > > Any ideas? > > > > > > > > > > Thanks in advance! > > > > > Dustin > > > > > _______________________________________________ > > > > > Facebooker-talk mailing list > > > > > Facebooker-talk at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Facebooker-talk mailing list > > > > Facebooker-talk at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > _______________________________________________ > > > Facebooker-talk mailing list > > > Facebooker-talk at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20080428/74e1aefc/attachment-0001.html>
Dustin Anderson
2008-Apr-29 00:35 UTC
[Facebooker-talk] facebook_session not working for me
Thanks Dave, I deleted all the content in my session table - didn''t seem to change much, but we''ll see. Anyway, I noticed that when I hit the new action with a value in params[:from], I get this error in my server log: Filter chain halted as [#<ActionController::Filters::ClassMethods::SymbolFilter:0x274f3e0 @filter=:ensure_application_is_installed_by_facebook_user>] rendered_or_redirected. Here is what my "invitations/new" action looks like: def new if params[:from] @user = facebook_session.user @user.profile_fbml = render_to_string(:partial=>"profile", :locals=>{:from=>params[:from]}) end @from_user_id = facebook_session.user.to_s end For the record, I don''t have +protect_from_forgery :secret+ set to anything in application_controller.rb any ideas what I''m doing wrong? Thanks again for all the help... Dustin On Mon, Apr 28, 2008 at 11:21 AM, David Clements <digidigo at gmail.com> wrote:> Hey Dustin, > > 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? > > 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? > > Dave > > > > On Sun, Apr 27, 2008 at 7:06 PM, Dustin Anderson <dustin at dustinanderson.com> > wrote: > > Hey Dave, I''m definitely calling > > ensure_application_is_installed_by_facebook_user in application.rb - > > so if I hit the server directly (e.g. localhost:3000), it sends me to > > a "You''ve already installed this app" page. > > > > Anyway, thanks Dave, but it must be something else... any other ideas? > > > > Thanks again for all the help. > > Dustin > > > > > > > > > > On Sun, Apr 27, 2008 at 3:12 PM, David Clements > > <david.g.clements at gmail.com> wrote: > > > I don''t have the book in front if me, but are you calling one of the > ensure > > > methods? Facebook_session will return nil unless you have authenticted > to > > > facebook. > > > > > > Dave > > > > > > Sent from my iPhone > > > > > > > > > > > > On Apr 27, 2008, at 9:13 AM, "Dustin Anderson" > <dustin at dustinanderson.com> > > > wrote: > > > > > > > > > > Thanks Ken, > > > > > > > > I could be wrong, but I''m pretty sure that facebook_session is being > > > > defined on page 50 in the book so that it can be accessed in the > > > > Model. In my case, I''m just trying to call it from the controller... > > > > so I should be able to call facebook_session in the controller ( I > > > > think)? > > > > > > > > Any other ideas? > > > > > > > > > > > > > > > > On Sat, Apr 26, 2008 at 10:28 PM, Ken Schroeder > <schroeder.ken at gmail.com> > > > wrote: > > > > > > > > > Do you have the facebook_session method defined? > > > > > > > > > > From pg 50 from Mike''s latest release. > > > > > > > > > > def facebook_session > > > > > @facebook_session ||> > > > > returning Facebooker::Session.create do |session| > > > > > session.secure_with!(session_key,facebook_id,1.day.from_now) > > > > > end > > > > > end > > > > > > > > > > > > > > > > > > > > On Sat, Apr 26, 2008 at 10:22 PM, Dustin Anderson > > > > > <dustin at dustinanderson.com> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hey All, > > > > > > > > > > > > I can''t get facebook_session to return anything but nil. > > > > > > > > > > > > I''m following along in Mike Mangino''s pragmatic programmer''s book > > > > > > about creating invitations - and adding info to a profile... > > > > > > > > > > > > There is a part where we are supposed to grab the @user to be able > to > > > > > > set the profile_fbml on it. > > > > > > @user = facebook_session.user > > > > > > @user.profile_fbml = render_to_string(:partial=>"profile", > > > > > > :locals=>{:from=>params[:from]}) > > > > > > > > > > > > Anyway, it never worked for me... I did an @user.inspect and it''s > just > > > > > > nil. facebook_session doesn''t return anything. > > > > > > > > > > > > Any ideas? > > > > > > > > > > > > Thanks in advance! > > > > > > Dustin > > > > > > _______________________________________________ > > > > > > Facebooker-talk mailing list > > > > > > Facebooker-talk at rubyforge.org > > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Facebooker-talk mailing list > > > > > Facebooker-talk at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Facebooker-talk mailing list > > > > Facebooker-talk at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk > >
The key is this line: [#<ActionController::Filters::ClassMethods::SymbolFilter:0x274f3e0 @filter=:ensure_application_is_installed_by_facebook_user>] rendered_or_redirected. That means that your Rails app doesn''t think the user has the application installed. Can you paste in the params that Rails is receiving? I would also double check and make sure that you have the right API Key and Secret Key in your Facebooker.yml Mike On Apr 28, 2008, at 8:35 PM, Dustin Anderson wrote:> Thanks Dave, > > I deleted all the content in my session table - didn''t seem to change > much, but we''ll see. > > Anyway, I noticed that when I hit the new action with a value in > params[:from], I get this error in my server log: > > Filter chain halted as > [#<ActionController::Filters::ClassMethods::SymbolFilter:0x274f3e0 > @filter=:ensure_application_is_installed_by_facebook_user>] > rendered_or_redirected. > > Here is what my "invitations/new" action looks like: > def new > if params[:from] > @user = facebook_session.user > @user.profile_fbml = render_to_string(:partial=>"profile", > :locals=>{:from=>params[:from]}) > end > @from_user_id = facebook_session.user.to_s > end > > For the record, I don''t have +protect_from_forgery :secret+ set to > anything in application_controller.rb > > any ideas what I''m doing wrong? > > Thanks again for all the help... > > Dustin > > > On Mon, Apr 28, 2008 at 11:21 AM, David Clements > <digidigo at gmail.com> wrote: >> Hey Dustin, >> >> 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? >> >> 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? >> >> Dave >> >> >> >> On Sun, Apr 27, 2008 at 7:06 PM, Dustin Anderson <dustin at dustinanderson.com >> > >> wrote: >>> Hey Dave, I''m definitely calling >>> ensure_application_is_installed_by_facebook_user in application.rb - >>> so if I hit the server directly (e.g. localhost:3000), it sends me >>> to >>> a "You''ve already installed this app" page. >>> >>> Anyway, thanks Dave, but it must be something else... any other >>> ideas? >>> >>> Thanks again for all the help. >>> Dustin >>> >>> >>> >>> >>> On Sun, Apr 27, 2008 at 3:12 PM, David Clements >>> <david.g.clements at gmail.com> wrote: >>>> I don''t have the book in front if me, but are you calling one of >>>> the >> ensure >>>> methods? Facebook_session will return nil unless you have >>>> authenticted >> to >>>> facebook. >>>> >>>> Dave >>>> >>>> Sent from my iPhone >>>> >>>> >>>> >>>> On Apr 27, 2008, at 9:13 AM, "Dustin Anderson" >> <dustin at dustinanderson.com> >>>> wrote: >>>> >>>> >>>>> Thanks Ken, >>>>> >>>>> I could be wrong, but I''m pretty sure that facebook_session is >>>>> being >>>>> defined on page 50 in the book so that it can be accessed in the >>>>> Model. In my case, I''m just trying to call it from the >>>>> controller... >>>>> so I should be able to call facebook_session in the controller ( I >>>>> think)? >>>>> >>>>> Any other ideas? >>>>> >>>>> >>>>> >>>>> On Sat, Apr 26, 2008 at 10:28 PM, Ken Schroeder >> <schroeder.ken at gmail.com> >>>> wrote: >>>>> >>>>>> Do you have the facebook_session method defined? >>>>>> >>>>>> From pg 50 from Mike''s latest release. >>>>>> >>>>>> def facebook_session >>>>>> @facebook_session ||>>>>>> returning Facebooker::Session.create do |session| >>>>>> session.secure_with!(session_key,facebook_id,1.day.from_now) >>>>>> end >>>>>> end >>>>>> >>>>>> >>>>>> >>>>>> On Sat, Apr 26, 2008 at 10:22 PM, Dustin Anderson >>>>>> <dustin at dustinanderson.com> wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> Hey All, >>>>>>> >>>>>>> I can''t get facebook_session to return anything but nil. >>>>>>> >>>>>>> I''m following along in Mike Mangino''s pragmatic programmer''s >>>>>>> book >>>>>>> about creating invitations - and adding info to a profile... >>>>>>> >>>>>>> There is a part where we are supposed to grab the @user to be >>>>>>> able >> to >>>>>>> set the profile_fbml on it. >>>>>>> @user = facebook_session.user >>>>>>> @user.profile_fbml = render_to_string(:partial=>"profile", >>>>>>> :locals=>{:from=>params[:from]}) >>>>>>> >>>>>>> Anyway, it never worked for me... I did an @user.inspect and >>>>>>> it''s >> just >>>>>>> nil. facebook_session doesn''t return anything. >>>>>>> >>>>>>> Any ideas? >>>>>>> >>>>>>> Thanks in advance! >>>>>>> Dustin >>>>>>> _______________________________________________ >>>>>>> Facebooker-talk mailing list >>>>>>> Facebooker-talk at rubyforge.org >>>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> Facebooker-talk mailing list >>>>>> Facebooker-talk at rubyforge.org >>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>>> >>>>>> >>>>>> >>>>> _______________________________________________ >>>>> Facebooker-talk mailing list >>>>> Facebooker-talk at rubyforge.org >>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>> >>>> >>> >> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >> >> > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk-- Mike Mangino http://www.elevatedrails.com
Dustin Anderson
2008-Apr-29 14:14 UTC
[Facebooker-talk] facebook_session not working for me
I''ll take a look at that - but isn''t the point of the exercise in the book to get the user to install the app? I''m following along in your book and having User A send User B an invitation. User B clicks to accept the invitation and install the app... but it can''t set profile_fbml yet because User B doesn''t have the app installed... What am I missing there? Thanks for your help!!! Here is the entry from the server log, including params: Processing InvitationsController#new (for 127.0.0.1 at 2008-04-28 19:38:12) [GET] Session ID: 889debacd82b82b6073a5d09-1212287943 Parameters: {"fb_sig_time"=>"1209429493.4035", "fb_sig"=>"eac54e67287ce09b54cd64d0546e2981", "from"=>"1191078019", "_method"=>"GET", "fb_sig_locale"=>"en_US", "action"=>"new", "fb_sig_position_fix"=>"1", "fb_sig_in_canvas"=>"1", "fb_sig_request_method"=>"GET", "controller"=>"invitations", "fb_sig_added"=>"0", "fb_sig_api_key"=>"8ab96c609067ad03f370386d65184439"} Filter chain halted as [#<ActionController::Filters::ClassMethods::SymbolFilter:0x26b15dc @filter=:ensure_application_is_installed_by_facebook_user>] rendered_or_redirected. Completed in 0.00055 (1821 reqs/sec) | Rendering: 0.00004 (7%) | DB: 0.00000 (0%) | 200 OK [http://db2400c2.fb.joyent.us/invitations/new?from=1191078019] Dustin On Tue, Apr 29, 2008 at 9:07 AM, Mike Mangino <mmangino at elevatedrails.com> wrote:> The key is this line: > > > [#<ActionController::Filters::ClassMethods::SymbolFilter:0x274f3e0 > @filter=:ensure_application_is_installed_by_facebook_user>] > rendered_or_redirected. > > That means that your Rails app doesn''t think the user has the application > installed. Can you paste in the params that Rails is receiving? I would also > double check and make sure that you have the right API Key and Secret Key in > your Facebooker.yml > > Mike > > > > > On Apr 28, 2008, at 8:35 PM, Dustin Anderson wrote: > > > > Thanks Dave, > > > > I deleted all the content in my session table - didn''t seem to change > > much, but we''ll see. > > > > Anyway, I noticed that when I hit the new action with a value in > > params[:from], I get this error in my server log: > > > > Filter chain halted as > > [#<ActionController::Filters::ClassMethods::SymbolFilter:0x274f3e0 > > @filter=:ensure_application_is_installed_by_facebook_user>] > > rendered_or_redirected. > > > > Here is what my "invitations/new" action looks like: > > def new > > if params[:from] > > @user = facebook_session.user > > @user.profile_fbml = render_to_string(:partial=>"profile", > > :locals=>{:from=>params[:from]}) > > end > > @from_user_id = facebook_session.user.to_s > > end > > > > For the record, I don''t have +protect_from_forgery :secret+ set to > > anything in application_controller.rb > > > > any ideas what I''m doing wrong? > > > > Thanks again for all the help... > > > > Dustin > > > > > > On Mon, Apr 28, 2008 at 11:21 AM, David Clements <digidigo at gmail.com> > wrote: > > > > > Hey Dustin, > > > > > > 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? > > > > > > 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? > > > > > > Dave > > > > > > > > > > > > On Sun, Apr 27, 2008 at 7:06 PM, Dustin Anderson > <dustin at dustinanderson.com> > > > wrote: > > > > > > > Hey Dave, I''m definitely calling > > > > ensure_application_is_installed_by_facebook_user in application.rb - > > > > so if I hit the server directly (e.g. localhost:3000), it sends me to > > > > a "You''ve already installed this app" page. > > > > > > > > Anyway, thanks Dave, but it must be something else... any other ideas? > > > > > > > > Thanks again for all the help. > > > > Dustin > > > > > > > > > > > > > > > > > > > > On Sun, Apr 27, 2008 at 3:12 PM, David Clements > > > > <david.g.clements at gmail.com> wrote: > > > > > > > > > I don''t have the book in front if me, but are you calling one of the > > > > > > > > > > > > ensure > > > > > > > > > > > > methods? Facebook_session will return nil unless you have > authenticted > > > > > > > > > > > > to > > > > > > > > > > > > facebook. > > > > > > > > > > Dave > > > > > > > > > > Sent from my iPhone > > > > > > > > > > > > > > > > > > > > On Apr 27, 2008, at 9:13 AM, "Dustin Anderson" > > > > > > > > > > > > <dustin at dustinanderson.com> > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > Thanks Ken, > > > > > > > > > > > > I could be wrong, but I''m pretty sure that facebook_session is > being > > > > > > defined on page 50 in the book so that it can be accessed in the > > > > > > Model. In my case, I''m just trying to call it from the > controller... > > > > > > so I should be able to call facebook_session in the controller ( I > > > > > > think)? > > > > > > > > > > > > Any other ideas? > > > > > > > > > > > > > > > > > > > > > > > > On Sat, Apr 26, 2008 at 10:28 PM, Ken Schroeder > > > > > > > > > > > > > > > > > > <schroeder.ken at gmail.com> > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > Do you have the facebook_session method defined? > > > > > > > > > > > > > > From pg 50 from Mike''s latest release. > > > > > > > > > > > > > > def facebook_session > > > > > > > @facebook_session ||> > > > > > > returning Facebooker::Session.create do |session| > > > > > > > session.secure_with!(session_key,facebook_id,1.day.from_now) > > > > > > > end > > > > > > > end > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Sat, Apr 26, 2008 at 10:22 PM, Dustin Anderson > > > > > > > <dustin at dustinanderson.com> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hey All, > > > > > > > > > > > > > > > > I can''t get facebook_session to return anything but nil. > > > > > > > > > > > > > > > > I''m following along in Mike Mangino''s pragmatic programmer''s > book > > > > > > > > about creating invitations - and adding info to a profile... > > > > > > > > > > > > > > > > There is a part where we are supposed to grab the @user to be > able > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > to > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > set the profile_fbml on it. > > > > > > > > @user = facebook_session.user > > > > > > > > @user.profile_fbml = render_to_string(:partial=>"profile", > > > > > > > > :locals=>{:from=>params[:from]}) > > > > > > > > > > > > > > > > Anyway, it never worked for me... I did an @user.inspect and > it''s > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > just > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > nil. facebook_session doesn''t return anything. > > > > > > > > > > > > > > > > Any ideas? > > > > > > > > > > > > > > > > Thanks in advance! > > > > > > > > Dustin > > > > > > > > _______________________________________________ > > > > > > > > Facebooker-talk mailing list > > > > > > > > Facebooker-talk at rubyforge.org > > > > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > Facebooker-talk mailing list > > > > > > > Facebooker-talk at rubyforge.org > > > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Facebooker-talk mailing list > > > > > > Facebooker-talk at rubyforge.org > > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > Facebooker-talk mailing list > > > Facebooker-talk at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > _______________________________________________ > > Facebooker-talk mailing list > > Facebooker-talk at rubyforge.org > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > -- > Mike Mangino > http://www.elevatedrails.com > > > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk >
When user B clicks to install the application, they should be redirected to a page asking them to install the application. That''s what the "ensure_application_is_installed_by_facebook_user" does. Is User B not asked to install the application? On Apr 29, 2008, at 10:14 AM, Dustin Anderson wrote:> I''ll take a look at that - but isn''t the point of the exercise in the > book to get the user to install the app? > > I''m following along in your book and having User A send User B an > invitation. User B clicks to accept the invitation and install the > app... but it can''t set profile_fbml yet because User B doesn''t have > the app installed... > > What am I missing there? > > Thanks for your help!!! > > Here is the entry from the server log, including params: > > Processing InvitationsController#new (for 127.0.0.1 at 2008-04-28 > 19:38:12) [GET] > Session ID: 889debacd82b82b6073a5d09-1212287943 > Parameters: {"fb_sig_time"=>"1209429493.4035", > "fb_sig"=>"eac54e67287ce09b54cd64d0546e2981", "from"=>"1191078019", > "_method"=>"GET", "fb_sig_locale"=>"en_US", "action"=>"new", > "fb_sig_position_fix"=>"1", "fb_sig_in_canvas"=>"1", > "fb_sig_request_method"=>"GET", "controller"=>"invitations", > "fb_sig_added"=>"0", > "fb_sig_api_key"=>"8ab96c609067ad03f370386d65184439"} > Filter chain halted as > [#<ActionController::Filters::ClassMethods::SymbolFilter:0x26b15dc > @filter=:ensure_application_is_installed_by_facebook_user>] > rendered_or_redirected. > Completed in 0.00055 (1821 reqs/sec) | Rendering: 0.00004 (7%) | DB: > 0.00000 (0%) | 200 OK > [http://db2400c2.fb.joyent.us/invitations/new?from=1191078019] > > Dustin > > On Tue, Apr 29, 2008 at 9:07 AM, Mike Mangino > <mmangino at elevatedrails.com> wrote: >> The key is this line: >> >> >> [#<ActionController::Filters::ClassMethods::SymbolFilter:0x274f3e0 >> @filter=:ensure_application_is_installed_by_facebook_user>] >> rendered_or_redirected. >> >> That means that your Rails app doesn''t think the user has the >> application >> installed. Can you paste in the params that Rails is receiving? I >> would also >> double check and make sure that you have the right API Key and >> Secret Key in >> your Facebooker.yml >> >> Mike >> >> >> >> >> On Apr 28, 2008, at 8:35 PM, Dustin Anderson wrote: >> >> >>> Thanks Dave, >>> >>> I deleted all the content in my session table - didn''t seem to >>> change >>> much, but we''ll see. >>> >>> Anyway, I noticed that when I hit the new action with a value in >>> params[:from], I get this error in my server log: >>> >>> Filter chain halted as >>> [#<ActionController::Filters::ClassMethods::SymbolFilter:0x274f3e0 >>> @filter=:ensure_application_is_installed_by_facebook_user>] >>> rendered_or_redirected. >>> >>> Here is what my "invitations/new" action looks like: >>> def new >>> if params[:from] >>> @user = facebook_session.user >>> @user.profile_fbml = render_to_string(:partial=>"profile", >>> :locals=>{:from=>params[:from]}) >>> end >>> @from_user_id = facebook_session.user.to_s >>> end >>> >>> For the record, I don''t have +protect_from_forgery :secret+ set to >>> anything in application_controller.rb >>> >>> any ideas what I''m doing wrong? >>> >>> Thanks again for all the help... >>> >>> Dustin >>> >>> >>> On Mon, Apr 28, 2008 at 11:21 AM, David Clements >>> <digidigo at gmail.com> >> wrote: >>> >>>> Hey Dustin, >>>> >>>> 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? >>>> >>>> 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? >>>> >>>> Dave >>>> >>>> >>>> >>>> On Sun, Apr 27, 2008 at 7:06 PM, Dustin Anderson >> <dustin at dustinanderson.com> >>>> wrote: >>>> >>>>> Hey Dave, I''m definitely calling >>>>> ensure_application_is_installed_by_facebook_user in >>>>> application.rb - >>>>> so if I hit the server directly (e.g. localhost:3000), it sends >>>>> me to >>>>> a "You''ve already installed this app" page. >>>>> >>>>> Anyway, thanks Dave, but it must be something else... any other >>>>> ideas? >>>>> >>>>> Thanks again for all the help. >>>>> Dustin >>>>> >>>>> >>>>> >>>>> >>>>> On Sun, Apr 27, 2008 at 3:12 PM, David Clements >>>>> <david.g.clements at gmail.com> wrote: >>>>> >>>>>> I don''t have the book in front if me, but are you calling one >>>>>> of the >>>>>> >>>>> >>>> ensure >>>> >>>>> >>>>>> methods? Facebook_session will return nil unless you have >> authenticted >>>>>> >>>>> >>>> to >>>> >>>>> >>>>>> facebook. >>>>>> >>>>>> Dave >>>>>> >>>>>> Sent from my iPhone >>>>>> >>>>>> >>>>>> >>>>>> On Apr 27, 2008, at 9:13 AM, "Dustin Anderson" >>>>>> >>>>> >>>> <dustin at dustinanderson.com> >>>> >>>>> >>>>>> wrote: >>>>>> >>>>>> >>>>>> >>>>>>> Thanks Ken, >>>>>>> >>>>>>> I could be wrong, but I''m pretty sure that facebook_session is >> being >>>>>>> defined on page 50 in the book so that it can be accessed in the >>>>>>> Model. In my case, I''m just trying to call it from the >> controller... >>>>>>> so I should be able to call facebook_session in the controller >>>>>>> ( I >>>>>>> think)? >>>>>>> >>>>>>> Any other ideas? >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Sat, Apr 26, 2008 at 10:28 PM, Ken Schroeder >>>>>>> >>>>>> >>>>> >>>> <schroeder.ken at gmail.com> >>>> >>>>> >>>>>> wrote: >>>>>> >>>>>>> >>>>>>> >>>>>>>> Do you have the facebook_session method defined? >>>>>>>> >>>>>>>> From pg 50 from Mike''s latest release. >>>>>>>> >>>>>>>> def facebook_session >>>>>>>> @facebook_session ||>>>>>>>> returning Facebooker::Session.create do |session| >>>>>>>> session.secure_with!(session_key,facebook_id,1.day.from_now) >>>>>>>> end >>>>>>>> end >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On Sat, Apr 26, 2008 at 10:22 PM, Dustin Anderson >>>>>>>> <dustin at dustinanderson.com> wrote: >>>>>>>> >>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> Hey All, >>>>>>>>> >>>>>>>>> I can''t get facebook_session to return anything but nil. >>>>>>>>> >>>>>>>>> I''m following along in Mike Mangino''s pragmatic programmer''s >> book >>>>>>>>> about creating invitations - and adding info to a profile... >>>>>>>>> >>>>>>>>> There is a part where we are supposed to grab the @user to be >> able >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> to >>>> >>>>> >>>>>> >>>>>>> >>>>>>>> >>>>>>>>> set the profile_fbml on it. >>>>>>>>> @user = facebook_session.user >>>>>>>>> @user.profile_fbml = render_to_string(:partial=>"profile", >>>>>>>>> :locals=>{:from=>params[:from]}) >>>>>>>>> >>>>>>>>> Anyway, it never worked for me... I did an @user.inspect and >> it''s >>>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> just >>>> >>>>> >>>>>> >>>>>>> >>>>>>>> >>>>>>>>> nil. facebook_session doesn''t return anything. >>>>>>>>> >>>>>>>>> Any ideas? >>>>>>>>> >>>>>>>>> Thanks in advance! >>>>>>>>> Dustin >>>>>>>>> _______________________________________________ >>>>>>>>> Facebooker-talk mailing list >>>>>>>>> Facebooker-talk at rubyforge.org >>>>>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> Facebooker-talk mailing list >>>>>>>> Facebooker-talk at rubyforge.org >>>>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> _______________________________________________ >>>>>>> Facebooker-talk mailing list >>>>>>> Facebooker-talk at rubyforge.org >>>>>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Facebooker-talk mailing list >>>> Facebooker-talk at rubyforge.org >>>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>>> >>>> >>>> >>> _______________________________________________ >>> Facebooker-talk mailing list >>> Facebooker-talk at rubyforge.org >>> http://rubyforge.org/mailman/listinfo/facebooker-talk >>> >> >> -- >> Mike Mangino >> http://www.elevatedrails.com >> >> >> >> >> >> _______________________________________________ >> Facebooker-talk mailing list >> Facebooker-talk at rubyforge.org >> http://rubyforge.org/mailman/listinfo/facebooker-talk >>-- Mike Mangino http://www.elevatedrails.com
Dustin Anderson
2008-Apr-29 15:00 UTC
[Facebooker-talk] facebook_session not working for me
Yes, User B is definitely asked to install the application - but it never sends the correct content (the _profile.erb partial) to the @user.profile_fbml Again, here''s the new action in the invitations controller: def new if params[:from] @user = facebook_session.user @user.profile_fbml = render_to_string(:partial=>"profile", :locals=>{:from=>params[:from]}) end @from_user_id = facebook_session.user.to_s end Thanks, dustin On Tue, Apr 29, 2008 at 9:41 AM, Mike Mangino <mmangino at elevatedrails.com> wrote:> When user B clicks to install the application, they should be redirected to > a page asking them to install the application. That''s what the > "ensure_application_is_installed_by_facebook_user" does. Is User B not asked > to install the application? > > > > > On Apr 29, 2008, at 10:14 AM, Dustin Anderson wrote: > > > > I''ll take a look at that - but isn''t the point of the exercise in the > > book to get the user to install the app? > > > > I''m following along in your book and having User A send User B an > > invitation. User B clicks to accept the invitation and install the > > app... but it can''t set profile_fbml yet because User B doesn''t have > > the app installed... > > > > What am I missing there? > > > > Thanks for your help!!! > > > > Here is the entry from the server log, including params: > > > > Processing InvitationsController#new (for 127.0.0.1 at 2008-04-28 > > 19:38:12) [GET] > > Session ID: 889debacd82b82b6073a5d09-1212287943 > > Parameters: {"fb_sig_time"=>"1209429493.4035", > > "fb_sig"=>"eac54e67287ce09b54cd64d0546e2981", "from"=>"1191078019", > > "_method"=>"GET", "fb_sig_locale"=>"en_US", "action"=>"new", > > "fb_sig_position_fix"=>"1", "fb_sig_in_canvas"=>"1", > > "fb_sig_request_method"=>"GET", "controller"=>"invitations", > > "fb_sig_added"=>"0", > > "fb_sig_api_key"=>"8ab96c609067ad03f370386d65184439"} > > Filter chain halted as > > [#<ActionController::Filters::ClassMethods::SymbolFilter:0x26b15dc > > @filter=:ensure_application_is_installed_by_facebook_user>] > > rendered_or_redirected. > > Completed in 0.00055 (1821 reqs/sec) | Rendering: 0.00004 (7%) | DB: > > 0.00000 (0%) | 200 OK > > [http://db2400c2.fb.joyent.us/invitations/new?from=1191078019] > > > > Dustin > > > > On Tue, Apr 29, 2008 at 9:07 AM, Mike Mangino > > <mmangino at elevatedrails.com> wrote: > > > > > The key is this line: > > > > > > > > > [#<ActionController::Filters::ClassMethods::SymbolFilter:0x274f3e0 > > > @filter=:ensure_application_is_installed_by_facebook_user>] > > > rendered_or_redirected. > > > > > > That means that your Rails app doesn''t think the user has the > application > > > installed. Can you paste in the params that Rails is receiving? I would > also > > > double check and make sure that you have the right API Key and Secret > Key in > > > your Facebooker.yml > > > > > > Mike > > > > > > > > > > > > > > > On Apr 28, 2008, at 8:35 PM, Dustin Anderson wrote: > > > > > > > > > > > > > Thanks Dave, > > > > > > > > I deleted all the content in my session table - didn''t seem to change > > > > much, but we''ll see. > > > > > > > > Anyway, I noticed that when I hit the new action with a value in > > > > params[:from], I get this error in my server log: > > > > > > > > Filter chain halted as > > > > [#<ActionController::Filters::ClassMethods::SymbolFilter:0x274f3e0 > > > > @filter=:ensure_application_is_installed_by_facebook_user>] > > > > rendered_or_redirected. > > > > > > > > Here is what my "invitations/new" action looks like: > > > > def new > > > > if params[:from] > > > > @user = facebook_session.user > > > > @user.profile_fbml = render_to_string(:partial=>"profile", > > > > :locals=>{:from=>params[:from]}) > > > > end > > > > @from_user_id = facebook_session.user.to_s > > > > end > > > > > > > > For the record, I don''t have +protect_from_forgery :secret+ set to > > > > anything in application_controller.rb > > > > > > > > any ideas what I''m doing wrong? > > > > > > > > Thanks again for all the help... > > > > > > > > Dustin > > > > > > > > > > > > On Mon, Apr 28, 2008 at 11:21 AM, David Clements <digidigo at gmail.com> > > > > > > > wrote: > > > > > > > > > > > > > > > > Hey Dustin, > > > > > > > > > > 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? > > > > > > > > > > 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? > > > > > > > > > > > > > > > > > Dave > > > > > > > > > > > > > > > > > > > > On Sun, Apr 27, 2008 at 7:06 PM, Dustin Anderson > > > > > > > > > > > > <dustin at dustinanderson.com> > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > Hey Dave, I''m definitely calling > > > > > > ensure_application_is_installed_by_facebook_user in application.rb > - > > > > > > so if I hit the server directly (e.g. localhost:3000), it sends me > to > > > > > > a "You''ve already installed this app" page. > > > > > > > > > > > > Anyway, thanks Dave, but it must be something else... any other > ideas? > > > > > > > > > > > > Thanks again for all the help. > > > > > > Dustin > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Sun, Apr 27, 2008 at 3:12 PM, David Clements > > > > > > <david.g.clements at gmail.com> wrote: > > > > > > > > > > > > > > > > > > > I don''t have the book in front if me, but are you calling one of > the > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ensure > > > > > > > > > > > > > > > > > > > > > > > > > > > > > methods? Facebook_session will return nil unless you have > > > > > > > > > > > > > > > > > > > > > > > > > authenticted > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > to > > > > > > > > > > > > > > > > > > > > > > > > > > > > > facebook. > > > > > > > > > > > > > > Dave > > > > > > > > > > > > > > Sent from my iPhone > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Apr 27, 2008, at 9:13 AM, "Dustin Anderson" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > <dustin at dustinanderson.com> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks Ken, > > > > > > > > > > > > > > > > I could be wrong, but I''m pretty sure that facebook_session is > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > being > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > defined on page 50 in the book so that it can be accessed in > the > > > > > > > > Model. In my case, I''m just trying to call it from the > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > controller... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > so I should be able to call facebook_session in the controller > ( I > > > > > > > > think)? > > > > > > > > > > > > > > > > Any other ideas? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Sat, Apr 26, 2008 at 10:28 PM, Ken Schroeder > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > <schroeder.ken at gmail.com> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Do you have the facebook_session method defined? > > > > > > > > > > > > > > > > > > From pg 50 from Mike''s latest release. > > > > > > > > > > > > > > > > > > def facebook_session > > > > > > > > > @facebook_session ||> > > > > > > > > returning Facebooker::Session.create do |session| > > > > > > > > > session.secure_with!(session_key,facebook_id,1.day.from_now) > > > > > > > > > end > > > > > > > > > end > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Sat, Apr 26, 2008 at 10:22 PM, Dustin Anderson > > > > > > > > > <dustin at dustinanderson.com> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hey All, > > > > > > > > > > > > > > > > > > > > I can''t get facebook_session to return anything but nil. > > > > > > > > > > > > > > > > > > > > I''m following along in Mike Mangino''s pragmatic > programmer''s > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > book > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > about creating invitations - and adding info to a > profile... > > > > > > > > > > > > > > > > > > > > There is a part where we are supposed to grab the @user to > be > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > able > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > to > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > set the profile_fbml on it. > > > > > > > > > > @user = facebook_session.user > > > > > > > > > > @user.profile_fbml = render_to_string(:partial=>"profile", > > > > > > > > > > :locals=>{:from=>params[:from]}) > > > > > > > > > > > > > > > > > > > > Anyway, it never worked for me... I did an @user.inspect > and > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > it''s > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > just > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > nil. facebook_session doesn''t return anything. > > > > > > > > > > > > > > > > > > > > Any ideas? > > > > > > > > > > > > > > > > > > > > Thanks in advance! > > > > > > > > > > Dustin > > > > > > > > > > _______________________________________________ > > > > > > > > > > Facebooker-talk mailing list > > > > > > > > > > Facebooker-talk at rubyforge.org > > > > > > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > > Facebooker-talk mailing list > > > > > > > > > Facebooker-talk at rubyforge.org > > > > > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > Facebooker-talk mailing list > > > > > > > > Facebooker-talk at rubyforge.org > > > > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Facebooker-talk mailing list > > > > > Facebooker-talk at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > Facebooker-talk mailing list > > > > Facebooker-talk at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > -- > > > Mike Mangino > > > http://www.elevatedrails.com > > > > > > > > > > > > > > > > > > _______________________________________________ > > > Facebooker-talk mailing list > > > Facebooker-talk at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > -- > Mike Mangino > http://www.elevatedrails.com > > > > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk >
Dustin Anderson
2008-Apr-30 02:32 UTC
[Facebooker-talk] facebook_session not working for me
Hey Mike, OK, so User A sends User B an invitation... User B receives the invitation. Inside the invitation, there is a button to add the app. Under the button, is the following code: onclick="return click_add_platform_app(47658, 14802292125, 0,1191078019,1,''MyAppName'', ''http://apps.facebook.com/my_app/invitations/new?from=1191078019'');" You''ll notice that it''s going to direct the user to /invitations/new - with the params[:from] set. So, in the new action, it should hit these two lines ( these are from the new action): @user = facebook_session.user @user.profile_fbml = render_to_string(:partial=>"profile", :locals=>{:from=>params[:from]}) However, it never even gets there because the user hasn''t added the app yet. I''m following along in the book and I feel like I''ve followed this section exactly - but either I''m missing something or the example has an error... either way, I do appreciate the help everyone is giving on this. Dustin On Tue, Apr 29, 2008 at 4:40 PM, Mike Mangino <mmangino at elevatedrails.com> wrote:> When the user installs the application, are they directed back to the new > invitation path? If not the profile won''t be updated. > > Mike > > > > > On Apr 29, 2008, at 10:00 AM, Dustin Anderson wrote: > > > > Yes, User B is definitely asked to install the application - but it > > never sends the correct content (the _profile.erb partial) to the > > @user.profile_fbml > > > > Again, here''s the new action in the invitations controller: > > > > def new > > if params[:from] > > @user = facebook_session.user > > > > @user.profile_fbml = render_to_string(:partial=>"profile", > > :locals=>{:from=>params[:from]}) > > end > > @from_user_id = facebook_session.user.to_s > > end > > > > Thanks, > > dustin > > > > On Tue, Apr 29, 2008 at 9:41 AM, Mike Mangino > > <mmangino at elevatedrails.com> wrote: > > > > > When user B clicks to install the application, they should be redirected > to > > > a page asking them to install the application. That''s what the > > > "ensure_application_is_installed_by_facebook_user" does. Is User B not > asked > > > to install the application? > > > > > > > > > > > > > > > On Apr 29, 2008, at 10:14 AM, Dustin Anderson wrote: > > > > > > > > > > > > > I''ll take a look at that - but isn''t the point of the exercise in the > > > > book to get the user to install the app? > > > > > > > > I''m following along in your book and having User A send User B an > > > > invitation. User B clicks to accept the invitation and install the > > > > app... but it can''t set profile_fbml yet because User B doesn''t have > > > > the app installed... > > > > > > > > What am I missing there? > > > > > > > > Thanks for your help!!! > > > > > > > > Here is the entry from the server log, including params: > > > > > > > > Processing InvitationsController#new (for 127.0.0.1 at 2008-04-28 > > > > 19:38:12) [GET] > > > > Session ID: 889debacd82b82b6073a5d09-1212287943 > > > > Parameters: {"fb_sig_time"=>"1209429493.4035", > > > > "fb_sig"=>"eac54e67287ce09b54cd64d0546e2981", "from"=>"1191078019", > > > > "_method"=>"GET", "fb_sig_locale"=>"en_US", "action"=>"new", > > > > "fb_sig_position_fix"=>"1", "fb_sig_in_canvas"=>"1", > > > > "fb_sig_request_method"=>"GET", "controller"=>"invitations", > > > > "fb_sig_added"=>"0", > > > > "fb_sig_api_key"=>"8ab96c609067ad03f370386d65184439"} > > > > Filter chain halted as > > > > [#<ActionController::Filters::ClassMethods::SymbolFilter:0x26b15dc > > > > @filter=:ensure_application_is_installed_by_facebook_user>] > > > > rendered_or_redirected. > > > > Completed in 0.00055 (1821 reqs/sec) | Rendering: 0.00004 (7%) | DB: > > > > 0.00000 (0%) | 200 OK > > > > [http://db2400c2.fb.joyent.us/invitations/new?from=1191078019] > > > > > > > > Dustin > > > > > > > > On Tue, Apr 29, 2008 at 9:07 AM, Mike Mangino > > > > <mmangino at elevatedrails.com> wrote: > > > > > > > > > > > > > The key is this line: > > > > > > > > > > > > > > > [#<ActionController::Filters::ClassMethods::SymbolFilter:0x274f3e0 > > > > > @filter=:ensure_application_is_installed_by_facebook_user>] > > > > > rendered_or_redirected. > > > > > > > > > > That means that your Rails app doesn''t think the user has the > > > > > > > > > > > > application > > > > > > > > > > > > installed. Can you paste in the params that Rails is receiving? I > would > > > > > > > > > > > > also > > > > > > > > > > > > double check and make sure that you have the right API Key and > Secret > > > > > > > > > > > > Key in > > > > > > > > > > > > your Facebooker.yml > > > > > > > > > > Mike > > > > > > > > > > > > > > > > > > > > > > > > > On Apr 28, 2008, at 8:35 PM, Dustin Anderson wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks Dave, > > > > > > > > > > > > I deleted all the content in my session table - didn''t seem to > change > > > > > > much, but we''ll see. > > > > > > > > > > > > Anyway, I noticed that when I hit the new action with a value in > > > > > > params[:from], I get this error in my server log: > > > > > > > > > > > > Filter chain halted as > > > > > > [#<ActionController::Filters::ClassMethods::SymbolFilter:0x274f3e0 > > > > > > @filter=:ensure_application_is_installed_by_facebook_user>] > > > > > > rendered_or_redirected. > > > > > > > > > > > > Here is what my "invitations/new" action looks like: > > > > > > def new > > > > > > if params[:from] > > > > > > @user = facebook_session.user > > > > > > @user.profile_fbml = render_to_string(:partial=>"profile", > > > > > > :locals=>{:from=>params[:from]}) > > > > > > end > > > > > > @from_user_id = facebook_session.user.to_s > > > > > > end > > > > > > > > > > > > For the record, I don''t have +protect_from_forgery :secret+ set to > > > > > > anything in application_controller.rb > > > > > > > > > > > > any ideas what I''m doing wrong? > > > > > > > > > > > > Thanks again for all the help... > > > > > > > > > > > > Dustin > > > > > > > > > > > > > > > > > > On Mon, Apr 28, 2008 at 11:21 AM, David Clements > <digidigo at gmail.com> > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hey Dustin, > > > > > > > > > > > > > > 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? > > > > > > > > > > > > > > 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? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Dave > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Sun, Apr 27, 2008 at 7:06 PM, Dustin Anderson > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > <dustin at dustinanderson.com> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hey Dave, I''m definitely calling > > > > > > > > ensure_application_is_installed_by_facebook_user in > application.rb > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > - > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > so if I hit the server directly (e.g. localhost:3000), it > sends me > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > to > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > a "You''ve already installed this app" page. > > > > > > > > > > > > > > > > Anyway, thanks Dave, but it must be something else... any > other > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ideas? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks again for all the help. > > > > > > > > Dustin > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Sun, Apr 27, 2008 at 3:12 PM, David Clements > > > > > > > > <david.g.clements at gmail.com> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I don''t have the book in front if me, but are you calling > one of > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > the > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ensure > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > methods? Facebook_session will return nil unless you have > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > authenticted > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > to > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > facebook. > > > > > > > > > > > > > > > > > > Dave > > > > > > > > > > > > > > > > > > Sent from my iPhone > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Apr 27, 2008, at 9:13 AM, "Dustin Anderson" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > <dustin at dustinanderson.com> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks Ken, > > > > > > > > > > > > > > > > > > > > I could be wrong, but I''m pretty sure that > facebook_session is > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > being > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > defined on page 50 in the book so that it can be accessed > in > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > the > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Model. In my case, I''m just trying to call it from the > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > controller... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > so I should be able to call facebook_session in the > controller > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ( I > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > think)? > > > > > > > > > > > > > > > > > > > > Any other ideas? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Sat, Apr 26, 2008 at 10:28 PM, Ken Schroeder > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > <schroeder.ken at gmail.com> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Do you have the facebook_session method defined? > > > > > > > > > > > > > > > > > > > > > > From pg 50 from Mike''s latest release. > > > > > > > > > > > > > > > > > > > > > > def facebook_session > > > > > > > > > > > @facebook_session ||> > > > > > > > > > > returning Facebooker::Session.create do |session| > > > > > > > > > > > > session.secure_with!(session_key,facebook_id,1.day.from_now) > > > > > > > > > > > end > > > > > > > > > > > end > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Sat, Apr 26, 2008 at 10:22 PM, Dustin Anderson > > > > > > > > > > > <dustin at dustinanderson.com> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hey All, > > > > > > > > > > > > > > > > > > > > > > > > I can''t get facebook_session to return anything but > nil. > > > > > > > > > > > > > > > > > > > > > > > > I''m following along in Mike Mangino''s pragmatic > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > programmer''s > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > book > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > about creating invitations - and adding info to a > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > profile... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > There is a part where we are supposed to grab the > @user to > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > be > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > able > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > to > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > set the profile_fbml on it. > > > > > > > > > > > > @user = facebook_session.user > > > > > > > > > > > > @user.profile_fbml > render_to_string(:partial=>"profile", > > > > > > > > > > > > :locals=>{:from=>params[:from]}) > > > > > > > > > > > > > > > > > > > > > > > > Anyway, it never worked for me... I did an > @user.inspect > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > and > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > it''s > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > just > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > nil. facebook_session doesn''t return anything. > > > > > > > > > > > > > > > > > > > > > > > > Any ideas? > > > > > > > > > > > > > > > > > > > > > > > > Thanks in advance! > > > > > > > > > > > > Dustin > > > > > > > > > > > > _______________________________________________ > > > > > > > > > > > > Facebooker-talk mailing list > > > > > > > > > > > > Facebooker-talk at rubyforge.org > > > > > > > > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > > > > Facebooker-talk mailing list > > > > > > > > > > > Facebooker-talk at rubyforge.org > > > > > > > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > > > Facebooker-talk mailing list > > > > > > > > > > Facebooker-talk at rubyforge.org > > > > > > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > Facebooker-talk mailing list > > > > > > > Facebooker-talk at rubyforge.org > > > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Facebooker-talk mailing list > > > > > > Facebooker-talk at rubyforge.org > > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > Mike Mangino > > > > > http://www.elevatedrails.com > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > Facebooker-talk mailing list > > > > > Facebooker-talk at rubyforge.org > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Mike Mangino > > > http://www.elevatedrails.com > > > > > > > > > > > > _______________________________________________ > > > Facebooker-talk mailing list > > > Facebooker-talk at rubyforge.org > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > -- > Mike Mangino > http://www.elevatedrails.com > > > >
Dustin Anderson
2008-May-01 02:19 UTC
[Facebooker-talk] facebook_session not working for me
Just for the record, I''m an idiot - this was likely working all along - I was looking in the Mini-Feed section to see the profile_fbml update information, not the profile area. Sorry for the runaround everyone... I''m learning ;-) On Tue, Apr 29, 2008 at 9:32 PM, Dustin Anderson <dustin at dustinanderson.com> wrote:> Hey Mike, > > OK, so User A sends User B an invitation... User B receives the > invitation. Inside the invitation, there is a button to add the app. > Under the button, is the following code: > > onclick="return click_add_platform_app(47658, 14802292125, > 0,1191078019,1,''MyAppName'', > ''http://apps.facebook.com/my_app/invitations/new?from=1191078019'');" > > You''ll notice that it''s going to direct the user to /invitations/new - > with the params[:from] set. So, in the new action, it should hit > these two lines ( these are from the new action): > > > @user = facebook_session.user > @user.profile_fbml = render_to_string(:partial=>"profile", > :locals=>{:from=>params[:from]}) > > However, it never even gets there because the user hasn''t added the app yet. > > I''m following along in the book and I feel like I''ve followed this > section exactly - but either I''m missing something or the example has > an error... either way, I do appreciate the help everyone is giving on > this. > > Dustin > > > On Tue, Apr 29, 2008 at 4:40 PM, Mike Mangino > > > <mmangino at elevatedrails.com> wrote: > > When the user installs the application, are they directed back to the new > > invitation path? If not the profile won''t be updated. > > > > Mike > > > > > > > > > > On Apr 29, 2008, at 10:00 AM, Dustin Anderson wrote: > > > > > > > Yes, User B is definitely asked to install the application - but it > > > never sends the correct content (the _profile.erb partial) to the > > > @user.profile_fbml > > > > > > Again, here''s the new action in the invitations controller: > > > > > > def new > > > if params[:from] > > > @user = facebook_session.user > > > > > > @user.profile_fbml = render_to_string(:partial=>"profile", > > > :locals=>{:from=>params[:from]}) > > > end > > > @from_user_id = facebook_session.user.to_s > > > end > > > > > > Thanks, > > > dustin > > > > > > On Tue, Apr 29, 2008 at 9:41 AM, Mike Mangino > > > <mmangino at elevatedrails.com> wrote: > > > > > > > When user B clicks to install the application, they should be redirected > > to > > > > a page asking them to install the application. That''s what the > > > > "ensure_application_is_installed_by_facebook_user" does. Is User B not > > asked > > > > to install the application? > > > > > > > > > > > > > > > > > > > > On Apr 29, 2008, at 10:14 AM, Dustin Anderson wrote: > > > > > > > > > > > > > > > > > I''ll take a look at that - but isn''t the point of the exercise in the > > > > > book to get the user to install the app? > > > > > > > > > > I''m following along in your book and having User A send User B an > > > > > invitation. User B clicks to accept the invitation and install the > > > > > app... but it can''t set profile_fbml yet because User B doesn''t have > > > > > the app installed... > > > > > > > > > > What am I missing there? > > > > > > > > > > Thanks for your help!!! > > > > > > > > > > Here is the entry from the server log, including params: > > > > > > > > > > Processing InvitationsController#new (for 127.0.0.1 at 2008-04-28 > > > > > 19:38:12) [GET] > > > > > Session ID: 889debacd82b82b6073a5d09-1212287943 > > > > > Parameters: {"fb_sig_time"=>"1209429493.4035", > > > > > "fb_sig"=>"eac54e67287ce09b54cd64d0546e2981", "from"=>"1191078019", > > > > > "_method"=>"GET", "fb_sig_locale"=>"en_US", "action"=>"new", > > > > > "fb_sig_position_fix"=>"1", "fb_sig_in_canvas"=>"1", > > > > > "fb_sig_request_method"=>"GET", "controller"=>"invitations", > > > > > "fb_sig_added"=>"0", > > > > > "fb_sig_api_key"=>"8ab96c609067ad03f370386d65184439"} > > > > > Filter chain halted as > > > > > [#<ActionController::Filters::ClassMethods::SymbolFilter:0x26b15dc > > > > > @filter=:ensure_application_is_installed_by_facebook_user>] > > > > > rendered_or_redirected. > > > > > Completed in 0.00055 (1821 reqs/sec) | Rendering: 0.00004 (7%) | DB: > > > > > 0.00000 (0%) | 200 OK > > > > > [http://db2400c2.fb.joyent.us/invitations/new?from=1191078019] > > > > > > > > > > Dustin > > > > > > > > > > On Tue, Apr 29, 2008 at 9:07 AM, Mike Mangino > > > > > <mmangino at elevatedrails.com> wrote: > > > > > > > > > > > > > > > > The key is this line: > > > > > > > > > > > > > > > > > > [#<ActionController::Filters::ClassMethods::SymbolFilter:0x274f3e0 > > > > > > @filter=:ensure_application_is_installed_by_facebook_user>] > > > > > > rendered_or_redirected. > > > > > > > > > > > > That means that your Rails app doesn''t think the user has the > > > > > > > > > > > > > > > application > > > > > > > > > > > > > > > installed. Can you paste in the params that Rails is receiving? I > > would > > > > > > > > > > > > > > > also > > > > > > > > > > > > > > > double check and make sure that you have the right API Key and > > Secret > > > > > > > > > > > > > > > Key in > > > > > > > > > > > > > > > your Facebooker.yml > > > > > > > > > > > > Mike > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Apr 28, 2008, at 8:35 PM, Dustin Anderson wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks Dave, > > > > > > > > > > > > > > I deleted all the content in my session table - didn''t seem to > > change > > > > > > > much, but we''ll see. > > > > > > > > > > > > > > Anyway, I noticed that when I hit the new action with a value in > > > > > > > params[:from], I get this error in my server log: > > > > > > > > > > > > > > Filter chain halted as > > > > > > > [#<ActionController::Filters::ClassMethods::SymbolFilter:0x274f3e0 > > > > > > > @filter=:ensure_application_is_installed_by_facebook_user>] > > > > > > > rendered_or_redirected. > > > > > > > > > > > > > > Here is what my "invitations/new" action looks like: > > > > > > > def new > > > > > > > if params[:from] > > > > > > > @user = facebook_session.user > > > > > > > @user.profile_fbml = render_to_string(:partial=>"profile", > > > > > > > :locals=>{:from=>params[:from]}) > > > > > > > end > > > > > > > @from_user_id = facebook_session.user.to_s > > > > > > > end > > > > > > > > > > > > > > For the record, I don''t have +protect_from_forgery :secret+ set to > > > > > > > anything in application_controller.rb > > > > > > > > > > > > > > any ideas what I''m doing wrong? > > > > > > > > > > > > > > Thanks again for all the help... > > > > > > > > > > > > > > Dustin > > > > > > > > > > > > > > > > > > > > > On Mon, Apr 28, 2008 at 11:21 AM, David Clements > > <digidigo at gmail.com> > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hey Dustin, > > > > > > > > > > > > > > > > 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? > > > > > > > > > > > > > > > > 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? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Dave > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Sun, Apr 27, 2008 at 7:06 PM, Dustin Anderson > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > <dustin at dustinanderson.com> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hey Dave, I''m definitely calling > > > > > > > > > ensure_application_is_installed_by_facebook_user in > > application.rb > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > - > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > so if I hit the server directly (e.g. localhost:3000), it > > sends me > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > to > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > a "You''ve already installed this app" page. > > > > > > > > > > > > > > > > > > Anyway, thanks Dave, but it must be something else... any > > other > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ideas? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks again for all the help. > > > > > > > > > Dustin > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Sun, Apr 27, 2008 at 3:12 PM, David Clements > > > > > > > > > <david.g.clements at gmail.com> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > I don''t have the book in front if me, but are you calling > > one of > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > the > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ensure > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > methods? Facebook_session will return nil unless you have > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > authenticted > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > to > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > facebook. > > > > > > > > > > > > > > > > > > > > Dave > > > > > > > > > > > > > > > > > > > > Sent from my iPhone > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Apr 27, 2008, at 9:13 AM, "Dustin Anderson" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > <dustin at dustinanderson.com> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks Ken, > > > > > > > > > > > > > > > > > > > > > > I could be wrong, but I''m pretty sure that > > facebook_session is > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > being > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > defined on page 50 in the book so that it can be accessed > > in > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > the > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Model. In my case, I''m just trying to call it from the > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > controller... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > so I should be able to call facebook_session in the > > controller > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ( I > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > think)? > > > > > > > > > > > > > > > > > > > > > > Any other ideas? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Sat, Apr 26, 2008 at 10:28 PM, Ken Schroeder > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > <schroeder.ken at gmail.com> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Do you have the facebook_session method defined? > > > > > > > > > > > > > > > > > > > > > > > > From pg 50 from Mike''s latest release. > > > > > > > > > > > > > > > > > > > > > > > > def facebook_session > > > > > > > > > > > > @facebook_session ||> > > > > > > > > > > > returning Facebooker::Session.create do |session| > > > > > > > > > > > > > > session.secure_with!(session_key,facebook_id,1.day.from_now) > > > > > > > > > > > > end > > > > > > > > > > > > end > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Sat, Apr 26, 2008 at 10:22 PM, Dustin Anderson > > > > > > > > > > > > <dustin at dustinanderson.com> wrote: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Hey All, > > > > > > > > > > > > > > > > > > > > > > > > > > I can''t get facebook_session to return anything but > > nil. > > > > > > > > > > > > > > > > > > > > > > > > > > I''m following along in Mike Mangino''s pragmatic > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > programmer''s > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > book > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > about creating invitations - and adding info to a > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > profile... > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > There is a part where we are supposed to grab the > > @user to > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > be > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > able > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > to > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > set the profile_fbml on it. > > > > > > > > > > > > > @user = facebook_session.user > > > > > > > > > > > > > @user.profile_fbml > > render_to_string(:partial=>"profile", > > > > > > > > > > > > > :locals=>{:from=>params[:from]}) > > > > > > > > > > > > > > > > > > > > > > > > > > Anyway, it never worked for me... I did an > > @user.inspect > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > and > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > it''s > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > just > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > nil. facebook_session doesn''t return anything. > > > > > > > > > > > > > > > > > > > > > > > > > > Any ideas? > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks in advance! > > > > > > > > > > > > > Dustin > > > > > > > > > > > > > _______________________________________________ > > > > > > > > > > > > > Facebooker-talk mailing list > > > > > > > > > > > > > Facebooker-talk at rubyforge.org > > > > > > > > > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > > > > > Facebooker-talk mailing list > > > > > > > > > > > > Facebooker-talk at rubyforge.org > > > > > > > > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > > > > Facebooker-talk mailing list > > > > > > > > > > > Facebooker-talk at rubyforge.org > > > > > > > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > > Facebooker-talk mailing list > > > > > > > > Facebooker-talk at rubyforge.org > > > > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > > Facebooker-talk mailing list > > > > > > > Facebooker-talk at rubyforge.org > > > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > > > Mike Mangino > > > > > > http://www.elevatedrails.com > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > Facebooker-talk mailing list > > > > > > Facebooker-talk at rubyforge.org > > > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > Mike Mangino > > > > http://www.elevatedrails.com > > > > > > > > > > > > > > > > _______________________________________________ > > > > Facebooker-talk mailing list > > > > Facebooker-talk at rubyforge.org > > > > http://rubyforge.org/mailman/listinfo/facebooker-talk > > > > > > > > > > > > > > > -- > > Mike Mangino > > http://www.elevatedrails.com > > > > > > > > >
You''''re certainly not the first to do that. I spent a day trying to figure out why profile updates weren''t happening. It turns out I was updating one user and looking at a different user''s profile. It happens to all of us :) Mike On Apr 30, 2008, at 9:19 PM, Dustin Anderson wrote:> Just for the record, I''m an idiot - this was likely working all along > - I was looking in the Mini-Feed section to see the profile_fbml > update information, not the profile area. Sorry for the runaround > everyone... I''m learning ;-) >-- Mike Mangino http://www.elevatedrails.com