简体   繁体   English

无法使用Android上的Cordova Socialsharing插件在Facebook上共享自定义文本

[英]Cannot share custom text on facebook with cordova socialsharing plugin on android

I am building an app, using cordova, for android and iphone. 我正在使用cordova为Android和iPhone构建一个应用程序。 I have this function to share some text on facebook: 我有此功能可以在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
        );
    });

In iphone is all working fine, i can share the text and the link on facebook thought the native app. 在iPhone上一切正常,我可以在本地应用程序上共享文本和Facebook上的链接。 In android, the facebook app will open but the custom text is missing, although the link do appear. 在android中,facebook应用将打开,但自定义文本丢失,尽管确实出现了链接。

You can see the resulting post here: https://www.dropbox.com/s/bo0ughcv9w36zec/Screen_Shot.png 您可以在此处查看结果帖子: https : //www.dropbox.com/s/bo0ughcv9w36zec/Screen_Shot.png

I have found some posts: https://developers.facebook.com/blog/post/510/ stating the custom message will be ignored, but I'm not sure this applies, besides in ios is working properly. 我发现了一些帖子: https : //developers.facebook.com/blog/post/510/声明自定义消息将被忽略,但是我不确定这是否适用,此外在ios中工作正常。 Any help will be appreciated. 任何帮助将不胜感激。 Thank you. 谢谢。

It seems that Facebook does not allow, in their facebook app for android, to add custom text, we can only share a link. 看来Facebook不允许在其Android版Facebook应用程序中添加自定义文本,我们只能共享一个链接。 More info can be found here: https://developers.facebook.com/bugs/332619626816423 可以在这里找到更多信息: https : //developers.facebook.com/bugs/332619626816423

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM