David Clements
2008-Jan-29 19:04 UTC
[Facebooker-talk] Facebook Redirects to Callback Path after log in
Hey, I am wondering if anyone has run into this issue before. I can''t seem to figure out what Facebook is doing. I have an application that only requires Facebook Authentication, the user doesn''t need to "add" the app. So at the top of my main controller I have class GettingStartedController < ApplicationController ensure_authenticated_to_facebook ...... end I hit the app and get this URL http://www.facebook.com/tos.php?api_key=442c6504bd2362d8a7fba7303cd583ca&next=&v=1.0# After I get the log in screen facebook sends a redirect to the CALLBACK path http://staging.travelerstable.com:8888/?auth_token=8a83bf3c4f33b5cb16d423c292663c59 Anyone else see this? I don''t think it has anything to do with Facebooker, or does it? If you look in the tos url you can see next, I wonder what that is for. Dave
Shawn Van Ittersum
2008-Jan-29 19:12 UTC
[Facebooker-talk] Facebook Redirects to Callback Path after log in
I think I''ve seen this with IFRAME apps... I forget what caused it or how to mitigate. Anyone else? Shawn On Tue, 29 Jan 2008 12:04:20 -0700, David Clements wrote:> Hey, > > I am wondering if anyone has run into this issue before. I can''t seem > to figure out what Facebook is doing. > > I have an application that only requires Facebook Authentication, the > user doesn''t need to "add" the app. So at the top of my main > controller I have > > > class GettingStartedController < ApplicationController > ensure_authenticated_to_facebook > ...... > > > end > > I hit the app and get this URL > > http://www.facebook.com/tos.php?api_key=442c6504bd2362d8a7fba7303cd583ca&next=&v=1.0# > > > After I get the log in screen facebook sends a redirect to the CALLBACK path > > http://staging.travelerstable.com:8888/?auth_token=8a83bf3c4f33b5cb16d423c292663c59 > > Anyone else see this? I don''t think it has anything to do with > Facebooker, or does it? If you look in the tos url you can see next> , I wonder what that is for. > > Dave > _______________________________________________ > Facebooker-talk mailing list > Facebooker-talk at rubyforge.org > http://rubyforge.org/mailman/listinfo/facebooker-talk
Heavy Sixer
2008-Jan-29 19:19 UTC
[Facebooker-talk] Facebook Redirects to Callback Path after log in
Facebook does not "follow" the link the user originally clicked when they tripped the "login" filter. Once the user has been logged in however that link will work as expected. The way that I got around this was adding a before_filter in my application.rb file looking for the auth_token and then just redirecting it on to my facebook controller. Mark On Jan 29, 2008, at 1:12 PM, Shawn Van Ittersum wrote:> I think I''ve seen this with IFRAME apps... I forget what caused it > or how to mitigate. Anyone else? > > Shawn > > On Tue, 29 Jan 2008 12:04:20 -0700, David Clements wrote: >> Hey, >> >> I am wondering if anyone has run into this issue before. I can''t >> seem >> to figure out what Facebook is doing. >> >> I have an application that only requires Facebook Authentication, the >> user doesn''t need to "add" the app. So at the top of my main >> controller I have >> >> >> class GettingStartedController < ApplicationController >> ensure_authenticated_to_facebook >> ...... >> >> >> end >> >> I hit the app and get this URL >> >> http://www.facebook.com/tos.php? >> api_key=442c6504bd2362d8a7fba7303cd583ca&next=&v=1.0# >> >> >> After I get the log in screen facebook sends a redirect to the >> CALLBACK path >> >> http://staging.travelerstable.com:8888/? >> auth_token=8a83bf3c4f33b5cb16d423c292663c59 >> >> Anyone else see this? I don''t think it has anything to do with >> Facebooker, or does it? If you look in the tos url you can see next>> , I wonder what that is for. >> >> Dave >> _______________________________________________ >> 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
Michael Niessner
2008-Jan-29 19:28 UTC
[Facebooker-talk] Facebook Redirects to Callback Path after log in
If you guys want to redirect to the original request after login just add the following to your application controller. def application_is_not_installed_by_facebook_user redirect_to session[:facebook_session].install_url(:next => "#{request.request_uri}") end On Jan 29, 2008, at 1:19 PM, Heavy Sixer wrote:> Facebook does not "follow" the link the user originally clicked when > they tripped the "login" filter. Once the user has been logged in > however that link will work as expected. The way that I got around > this was adding a before_filter in my application.rb file looking for > the auth_token and then just redirecting it on to my facebook > controller. > > Mark > > > On Jan 29, 2008, at 1:12 PM, Shawn Van Ittersum wrote: > >> I think I''ve seen this with IFRAME apps... I forget what caused it >> or how to mitigate. Anyone else? >> >> Shawn >> >> On Tue, 29 Jan 2008 12:04:20 -0700, David Clements wrote: >>> Hey, >>> >>> I am wondering if anyone has run into this issue before. I can''t >>> seem >>> to figure out what Facebook is doing. >>> >>> I have an application that only requires Facebook Authentication, >>> the >>> user doesn''t need to "add" the app. So at the top of my main >>> controller I have >>> >>> >>> class GettingStartedController < ApplicationController >>> ensure_authenticated_to_facebook >>> ...... >>> >>> >>> end >>> >>> I hit the app and get this URL >>> >>> http://www.facebook.com/tos.php? >>> api_key=442c6504bd2362d8a7fba7303cd583ca&next=&v=1.0# >>> >>> >>> After I get the log in screen facebook sends a redirect to the >>> CALLBACK path >>> >>> http://staging.travelerstable.com:8888/? >>> auth_token=8a83bf3c4f33b5cb16d423c292663c59 >>> >>> Anyone else see this? I don''t think it has anything to do with >>> Facebooker, or does it? If you look in the tos url you can see >>> next>>> , I wonder what that is for. >>> >>> Dave >>> _______________________________________________ >>> 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