[Facebooker-talk] ensure_authenticated_to_facebook - redirect?
Richard Jordan
jordanr at cs.washington.edu
Fri Aug 15 11:28:49 EDT 2008
I use a before_filter thrown on a facebook auth_token. Here is the code.
======================================================
# when a user authenticates to facebook this before filter redirects
# the user back to a fbml canvas page instead of to html on our server.
before_filter :redirect_if_auth_key
# keeps the user inside facebook
def redirect_if_auth_key
if( params[:auth_token])
redirect_to( url_for(:action => "whateveryouwant",
:canvas => true, :only_path => false))
end
end
======================================================
Try the filter in your app/controller/application.rb.
Richard
On Thu, 14 Aug 2008, Allen Walker wrote:
> If someone isn't logged in this filter works - it takes them to the facebook
> login page. However after logging in it's going to my root application URL
> outside of facebook. How do I set the proper redirect URL after a user logs
> into facebook?
>
> thanks
> _______________________________________________
> Facebooker-talk mailing list
> Facebooker-talk at rubyforge.org
> http://rubyforge.org/mailman/listinfo/facebooker-talk
>
>
More information about the Facebooker-talk
mailing list