添加社交分享链接到phonegap应用程序 [英] adding social share links to phonegap app

查看:110
本文介绍了添加社交分享链接到phonegap应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序使用jquery mobile,它的输出和图像。

i have an app that is using jquery mobile and it outputs and image.

现在我已经在预览页面中显示图像,我已经添加了以下链接在Facebook和Twitter和其他平台上分享它们

now i have displayed the image in a preview page and i have added links below to share them on facebook and twitter and other platforms

如何编码...

用户点击共享按钮默认共享pannel应该像这样弹出

when the user click on the share button the default share pannel should pop up like this

https://cdn.tutsplus.com/mobile/uploads/legacy/Android-SDK_Share-Activity/android_share_chooser.png

当用户选择例如twitter的twitter应用程序打开并且图像应该被附加时。

when the user select for example twitter the twitter app opens and the image should be attached.

..should i be looking in the apis of the social site or Android api or phonegap api

How can this be achived..should i be looking in the apis of the social site or android api or phonegap api

推荐答案

PhoneGap社交分享,iOS和Window



使用CLI安装

PhoneGap Social Sharing plugin for Android, iOS and Window

Install with the CLI

cordova外挂程式add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git

cordova plugin add 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>

更多...

More...

这篇关于添加社交分享链接到phonegap应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆