[Facebooker-talk] Session key invalid or no longer valid
Adeel Ahmad
adeel at proletariandesign.com
Sun Feb 1 12:51:17 EST 2009
This may be related to Aaron's question on Jan. 30. However in my case I
doing Facebook Connect using Facebooker for my site.
Following the Facebook Connect tutorial it does create a session and show
the user as logged in. For now I have the same 'fb' controller just to demo
log in.
However if the user logs out at facebook.com and then refreshes fb/index on
my site, I get "Session key invalid or no longer valid" on the line that
outputs @facebook_session.user.name. Just FYI if I output
@facebook_session.user.to_s it does give me the uid.
If you look at the stack trace below you'll notice that it passes through a
number of actions that test for existence and validity of the session. It
has a problem in the Error class of parser.rb. I would think it should catch
the problem a lot earlier than in parser.rb.
Any thoughts on how to troubleshoot and/or workaround this? I'm on Rails
2.1.1.
========================================
Facebooker::Session::SessionExpired in Fb#index
Showing fb/index.html.erb where line #10 raised:
Session key invalid or no longer valid
Extracted source (around line #10):
7: <%= fb_login_button%>
8:
9: <% if facebook_session %>
10: <h2>You are logged in as <%= facebook_session.user.name %></h2>
11: <% else %>
12: <h2>You are not logged in!</h2>
13: <% end %>
vendor/plugins/facebooker/lib/facebooker/parser.rb:487:in `process'
vendor/plugins/facebooker/lib/facebooker/parser.rb:15:in `parse'
vendor/plugins/facebooker/lib/facebooker/service.rb:20:in `post'
vendor/plugins/facebooker/lib/facebooker/session.rb:473:in
`post_without_logging'
vendor/plugins/facebooker/lib/facebooker/session.rb:484:in `post'
vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in `log_fb_api'
vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:8:in
`realtime'
vendor/plugins/facebooker/lib/facebooker/logging.rb:27:in `log_fb_api'
vendor/plugins/facebooker/lib/facebooker/session.rb:483:in `post'
vendor/plugins/facebooker/lib/facebooker/models/user.rb:120:in `populate'
vendor/plugins/facebooker/lib/facebooker/model.rb:35:in `name'
app/views/fb/index.html.erb:10:in
`_run_erb_47app47views47fb47index46html46erb'
--
- Adeel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20090201/178154e7/attachment.html>
More information about the Facebooker-talk
mailing list