当我点击分享按钮提醒("输入")显示其对其他部分的访问权限,但之后显示"在Facebook上共享此日记时发生错误" .Facebook连接一切都很完美。请帮我解决这个问题。谢谢你提前
$scope.share = function(detail){
alert("share");
if(!FbShare.getFbDataShare())
{
ngFB.init({appId: '****************'});
ngFB.login({
scope: 'email'
}).then(function(response){
if(response.status === 'connected'){
FbShare.setFbDataShare(response.authResponse.accessToken);
$scope.share(detail);
}else{
$cordovaToast.showLongCenter("Facebook login failed");
}
});
}else{
alert("enter");
alert(detail.title);
ngFB.api({
method: 'POST',
path: '/me/feed',
params: {
message: "From My Diary",
name: detail.title,
description: detail.description
}
}).then(function(){
alert("The diary was shared on Facebook");
}, function(){
alert("An error occurred while sharing this diary on Facebook");
});
}
}