我正在使用 FB.ui 使用简单的应用程序 Facebook 选项卡进行授权:
FB.init({
appId : '<%= Facebook::APP_ID %>',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
channelUrl : 'http://<%= request.host_with_port %>/channel.html', // Custom Channel URL
oauth : true //enables OAuth 2.0
});
FB.ui({
method: 'oauth'
},
function(response) {
// do some redirect stuff here
});
授权很好,但即使用户确认应用程序,相关的 fbsr_xxxxx cookie 也没有设置。有什么办法可以强制吗?响应对象包含 user_id,但我宁愿将标准流程与 signed_request 一起使用。