use*_*344 2 jquery android facebook-social-plugins phonegap-plugins cordova
我有一个使用jquery mobile的应用程序,它输出和图像.
现在我已经在预览页面中显示了图像,我在下面添加了链接,在Facebook和Twitter以及其他平台上分享
我该如何编码...
当用户单击共享按钮时,默认共享面板应该像这样弹出
https://cdn.tutsplus.com/mobile/uploads/legacy/Android-SDK_Share-Activity/android_share_chooser.png
当用户选择例如twitter时,Twitter应用程序打开并且应该附加图像.
怎么能实现这个...我应该在社交网站的api或android api或phonegap api中查找
使用CLI安装
cordova插件添加https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git
添加到您的页面
<button onclick="window.plugins.socialsharing.share('Message, image and link', null, 'https://www.google.nl/images/srpr/logo4w.png', 'http://www.x-services.nl')">message, image and link</button>
<button onclick="window.plugins.socialsharing.share('Message, subject, image and link', 'The subject', 'https://www.google.nl/images/srpr/logo4w.png', 'http://www.x-services.nl')">message, subject, image and link</button>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11237 次 |
| 最近记录: |