0

I'm using this gem for Facebook authentication in my Rails app.

I'm having some issues in IE and I think it's because of an issue in the Javascript in this file -

If you look at line 52, it seems I can pass options into channelUrl.

I'm implementing a login button like this -

<%= fb_login(:text=>"Log in") %>

Can I do this from my app, or do I need to edit the gem?

Devin M
  • 9,636
  • 2
  • 33
  • 46
Finnnn
  • 3,530
  • 6
  • 46
  • 69

1 Answers1

0

If I look at the README, you should have a partial like this one:

<%= 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(:text => 'Log in', :perms => 'email,user_birthday') %>
<% end %>

In that case, you just have to pass the options to fb_connect_async_js:

<%= fb_connect_async_js :channel_url => 'http://blahblah' %>
... rest of the partial ...

If your partial doesn't look like the one above, you should edit your question to post yours (the full one).

Benoit Garret
  • 14,027
  • 4
  • 59
  • 64
  • thanks again, at this rate I'm going to have to send you my salary this month. – Finnnn Dec 13 '11 at 16:27
  • @user597264 I'll need facebook integration later this month, my answers are a bit self-serving ;-) – Benoit Garret Dec 13 '11 at 16:35
  • My only advice would be to do cross browser testing as early on as possible. I'm in a world of pain trying to sort out some Internet explorer login issues. – Finnnn Dec 13 '11 at 16:47