Created
September 10, 2010 12:47
-
-
Save josefrichter/573575 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= fb_connect_async_js %> | |
<% if current_facebook_user %> | |
<%= "Welcome #{current_facebook_user.first_name} #{current_facebook_user.last_name}!" %> | |
or | |
<%= "Hello #{fb_name(current_facebook_user, :useyou => false)}!" # link to facebook profile | |
%> | |
<%= fb_logout_link("Logout of fb", request.url) %><br /> | |
<% else | |
# you must explicitly request permissions for facebook user fields. | |
# here we instruct facebook to ask the user for permission for our website | |
# to access the user's facebook email and birthday | |
%> | |
<%= fb_login_and_redirect('<your URL here>', :perms => 'email,user_birthday') %> | |
<% end %> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment