views:

137

answers:

1

How does one request extended permissions? Adding a :perms key to the hash

<%#= authlogic_facebook_login_button :text => 'Login with Facebook', :v => 2, :perms => "email,user_birthday" %>

causes the FBML to render as

<form id='connect_to_facebook_form' method='post' action='/user_session'>
<input type='hidden' name='authenticity_token' value='CODE HERE'/>
</form>
<script type='text/javascript' charset='utf-8'>
 function connect_to_facebook() {
   $('connect_to_facebook_form').submit();
 }
</script>
<fb:login-button js="prototype" onlogin="connect_to_facebook()" perms="email,user_birthday" v="2">Login with Facebook</fb:login-button>

but clicking on the button serves up the vanilla no-extended-permissions popup, so the form submission is clearly not picking up the perms key-value pair off of the login-button.

What to do?

Thanks.

[Edit]: Actually, more bizarre behavior to report. No :perms element causes the popup to only say "Basic information" while having the :perms element, even with :perms => "nonsense_key", makes the popup say "Basic information + email".

+1  A: 

Apparently it has to be defined in the init_fb_connect tag.

<%= init_fb_connect "XFBML", {:app_settings => " { permsToRequestOnConnect : 'email' }"}  %>
unsorted