如何请求扩展权限?将:perms键添加到哈希
<%#= authlogic_facebook_login_button :text => 'Login with Facebook', :v => 2, :perms => "email,user_birthday" %>
使FBML渲染为
<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>
但是单击按钮会弹出vanilla no extended permissions弹出窗口,因此表单提交显然没有从login按钮中提取perms键值对。
谢谢。
[编辑]:
事实上,更离奇的行为报告。No:perms元素使弹出窗口在具有:perms元素时仅显示“基本信息”,即使具有:perms=>“U键”,使弹出窗口显示“基本信息+电子邮件”。