My Web Log Book

authlogic_facebook_connect with a custom callback URL

If you’re using authlogic_facebook_connect to have facebook integration in your site and don’t want to use the standard callback url of http:///user_session, then pass a controller option to the authlogic_facebook_login_button function and pass the controller name. Actually you don’t need a controller name, just the path from the root url would do.

Here’s the code I am using, that’s facebook redirects to /authenticate using HTTP Post.

<%= authlogic_facebook_login_button :length => "long", :controller => 'authenticate' %>