Skip to content

Instantly share code, notes, and snippets.

@josefrichter
Created September 10, 2010 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josefrichter/573706 to your computer and use it in GitHub Desktop.
Save josefrichter/573706 to your computer and use it in GitHub Desktop.
<% fb_connect_async_js do %>
<% unless current_facebook_user %>
FB.login(function(response) {
if (response.session) {
// window.location.href = '#{request.url}';
window.location.href = '<%= root_url %>';
} else {
// user cancelled login
}
}, {perms:'read_stream,offline_access,email,user_status,user_interests,user_location,user_online_presence'});
<% end %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment