登录正在工作,但它只要求基本权限,并且在取消或完成对话框时不会触发警报。
window.fbAsyncInit = function() {
// init the FB JS SDK
FB.init({
appId : 'XXX', // App ID from the App Dashboard
channelUrl : 'XXX', // Channel File for x-domain communication
cookie : true, // set sessions cookies to allow your server to access the session?
xfbml : true, // parse XFBML tags on this page?
frictionlessRequests: true,
oauth: true
});
FB.login(function(response) {
if (response.authResponse) {
alert("ok");
} else {
alert("canceled");
}
}, {scope:'publish_actions,publish_stream'});
};