我正在将此cordova facebook plugin用于使用Onsen UI + Vue + Cordova构建的移动应用程序,虽然能够登录,但无法使用图形API检索当前已记录的用户信息,以下是我的尝试
facebookConnectPlugin.login(["public_profile","email"],
function (userData) {
if( userData.status == 'connected' ){
alert('You are connected, retreiving data');
facebookConnectPlugin.api("/"+userData.authResponse.userID+"?fields=first_name,last_name,email", ["public_profile","email"],
function (result) {
alert('success: '+JSON.stringify(result) );
},
function (error) {
alert("Failed: " + JSON.stringify( error) );
}
);
}else{
}
},
function (error) {
alert(JSON.stringify(error));
}
);
此alert('You are connected, retreiving data');
确实触发了我可以确认来自facebookConnectPlugin.login
的响应,但是此部分facebookConnectPlugin.api("/"+userData.authResponse.userID+"?fields=first_name,last_name,email", ["public_profile","email"]
没有触发,这是怎么回事?任何帮助,想法请