![](/img/trans.png)
[英]Check facebook application installed or not in “SocialSharing” plugin for phonegap
[英]Cannot share custom text on facebook with cordova socialsharing plugin on android
我正在使用cordova为Android和iPhone构建一个应用程序。 我有此功能可以在Facebook上共享一些文本:
window.plugins.socialsharing.canShareVia('com.facebook.katana', 'msg', null, null, null,
function () {
window.plugins.socialsharing.shareViaFacebook("Some custom text here" + link),
null,
null,
console.log('share ok'), // success callback
function (errormsg) {
alert(errormsg);
}); // error callback
},
function () {
console.log("NO FACEBOOK AVAILABLE");
navigator.notification.alert('The Facebook app is not available on your device.', // message
console.log('facebook app not installed'), // callback
'Share', // title
'Ok' // buttonName
);
});
在iPhone上一切正常,我可以在本地应用程序上共享文本和Facebook上的链接。 在android中,facebook应用将打开,但自定义文本丢失,尽管确实出现了链接。
您可以在此处查看结果帖子: https : //www.dropbox.com/s/bo0ughcv9w36zec/Screen_Shot.png
我发现了一些帖子: https : //developers.facebook.com/blog/post/510/声明自定义消息将被忽略,但是我不确定这是否适用,此外在ios中工作正常。 任何帮助将不胜感激。 谢谢。
看来Facebook不允许在其Android版Facebook应用程序中添加自定义文本,我们只能共享一个链接。 可以在这里找到更多信息: https : //developers.facebook.com/bugs/332619626816423
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.