![]() | Too many redirects from ensure_authenticated_to_facebook |
|
04 Nov 2009, 20:03
William Hertling (23 posts) |
Hi, Within the last day or so, our app has suddenly broke. We haven’t pushed any code changes, so I’m curious if Facebook has pushed any changes that would have broken things? The behavior I see is that when we call ensure_authenticated_to_facebook, it repeatedly redirects. In other words, when it hits ensure_authenticated_to_facebook, it always takes the create_new_facebook_session_and_redirect! path.
Any ideas what could be wrong? I’m not sure the right way to find out what version of the facebooker I have. According to what’s in facebooker.gemspec, I have: s.version = “1.0.48” === HEAD
=== 1.0.13 / 2009-02-26 |
|
05 Nov 2009, 12:33
Mike Mangino (543 posts) |
That’s pretty fundamental code. I don’t believe any of it has changed. Can you send the params that you are receiving? Are you sure your facebooker.yml file hasn’t changed? |
|
28 Jan 2010, 10:48
Ivan Kuznetsov (3 posts) |
I observe interesting behaviour with ensure_authenticated_to_facebook and FB connect: If I have in the controller that is responsible for welcoming FB-connect users and mapping the to internal accounts before_filter :ensure_authenticated_to_facebook
then it crashes when users go directly to this controller (Facebooker::Session::MissingOrInvalidParameter “Invalid parameter”). What happens is user goes to http://foo.com/fb_connect_controller/method and if there’s no FB session, then FB authentication form is opened not as IFRAME. If logging in using FB-connect happens like this: then same controller works fine, and FB authentication form appears in IFRAME. Replacing before filter with:
before_filter :ensure_authenticated_to_facebook_once
def ensure_authenticated_to_facebook_once
unless facebook_session
ensure_authenticated_to_facebook
end
end
solves that problem, but I’m not sure this is the right way to do it. |
|
28 Jan 2010, 14:42
Mike Mangino (543 posts) |
you shouldn’t use ensure_authenticated_to_facebook for facebook connect. That’s a canvas app only setting. You actually want to use |
|
29 Dec 2010, 00:15
daniel (2 posts) |
Same problem using canvas with iframe. ensure_authenticated_to_facebook runs properly for show the fb request for permission for user app acceptance, but when try to obtain the facebook_session, obtain the error: a lot of time try and try … without solution |
| You must be logged in to comment |

