0

I am just using the standard Facebooker2 setup.

        <%= fb_connect_async_js %>
            <% if current_facebook_user %>
              <%= "Hello #{fb_name(current_facebook_user, :useyou => false)}!" %>
              <%= fb_logout_link("Logout", request.url) %><br />
            <% else %>
              <%= fb_login_and_redirect('/login', :scope => 'user_about_me') %>
            <% end %>

What displays on the page is:

Hello <fb:name uid="73648576" useyou="false"></fb:name>

I am sure there's something very basic wrong here, but I've followed the instructions, done tutorials, wetc. and continue to get this result.

Any help most appreciated!

ap-andrew
  • 131
  • 4

1 Answers1

0

Not sure why fb_name isn't working, but you could use the other method as specified in the readme. In this case, you need to call the fetch method on current_facebook_user first:

<% if current_facebook_user %>
  <% current_facebook_user.fetch %>
  <%= "Welcome #{current_facebook_user.first_name} #{current_facebook_user.last_name}!" %>

Ref: http://www.engineyard.com/video/21045039 (around 9:36)

David Dai
  • 3
  • 1
  • Looking at this again, are the Facebooker2 helpers bypassed when you directly call current_facebook_user.*. . . Would the root cause be a config issue, do you think? – ap-andrew May 19 '12 at 19:41
  • I'm not sure, but I'm only using facebooker2 for login, so I just need to grab first_name, last_name, email, and id, and can reference those with current_facebook_user.* – David Dai May 19 '12 at 20:07