小编psa*_*tos的帖子

无法在facebook上与cordova s​​ocialsharing插件共享自定义文本

我正在构建一个应用程序,使用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
        );
    });
Run Code Online (Sandbox Code Playgroud)

在iPhone是一切正常,我可以分享文本和Facebook上的链接认为本机应用程序.在Android中,Facebook应用程序将打开,但自定义文本丢失,虽然链接确实出现.

您可以在此处查看生成的帖子:https://www.dropbox.com/s/bo0ughcv9w36zec/Screen_Shot.png

我找到了一些帖子:https://developers.facebook.com/blog/post/510/说明自定义消息将被忽略,但我不确定这是否适用,除了ios工作正常.任何帮助将不胜感激.谢谢.

social android sharing cordova

1
推荐指数
1
解决办法
3806
查看次数

标签 统计

android ×1

cordova ×1

sharing ×1

social ×1