Phonegap/Cordova 社交分享 js shareViaFacebook 在 window phone 中不起作用
Phonegap/Cordova Social sharing js shareViaFacebook not working in window phone
我在我的 phonegap 应用程序中使用 SocialSharing.js 插件分享 link(Window Phone)。有些功能有效,有些功能无效。我无法直接在 Facebook 上分享 link。示例如下:-
工作:-
<button onclick="window.plugins.socialsharing.share(null, null, null, 'http://www.x-services.nl')">link only</button>
不工作:-
<button onclick="window.plugins.socialsharing.shareViaFacebook('Message via Facebook', null /* img */, null /* url */, function() {console.log('share ok')}, function(errormsg){alert(errormsg)})">Direct Fb link</button>
//when click on 'Direct Fb lin' button, it show error message i.e, Invalid action.
发生这种情况是因为此插件在 windows phone 平台上不支持 shareViaFacebook 方法。
WP8上可用的方法有:available、canShareViaEmail、share、shareViaEmail和shareViaSMS。
我在我的 phonegap 应用程序中使用 SocialSharing.js 插件分享 link(Window Phone)。有些功能有效,有些功能无效。我无法直接在 Facebook 上分享 link。示例如下:-
工作:-
<button onclick="window.plugins.socialsharing.share(null, null, null, 'http://www.x-services.nl')">link only</button>
不工作:-
<button onclick="window.plugins.socialsharing.shareViaFacebook('Message via Facebook', null /* img */, null /* url */, function() {console.log('share ok')}, function(errormsg){alert(errormsg)})">Direct Fb link</button>
//when click on 'Direct Fb lin' button, it show error message i.e, Invalid action.
发生这种情况是因为此插件在 windows phone 平台上不支持 shareViaFacebook 方法。
WP8上可用的方法有:available、canShareViaEmail、share、shareViaEmail和shareViaSMS。