https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git

  从上面的连接下载 插件

1.肯定是要加入 下面的那个文件的吖 从这里下载 ngCordova.min.js

2. 不要忘记了 在app.js 中注入 ngCordova

 angular.module('starter', ['ionic', 'ngCordova'])

3. 在控制器中  注意:不要忘记注入  $cordovaSocialSharing ,不然会报错的呀

.controller("yourCtr", function($scope, $cordovaSocialSharing) {

    $scope.shareAnywhere = function() {
$cordovaSocialSharing.share("This is your message", "This is your subject", "www/imagefile.png", "http://www.baidu.com");
} $scope.shareViaTwitter = function(message, image, link) {
$cordovaSocialSharing.canShareVia("twitter", message, image, link).then(function(result) {
$cordovaSocialSharing.shareViaTwitter(message, image, link);
}, function(error) {
alert("Cannot share on Twitter");
});
} });

4.your HTML 中call this function

<button class="button" ng-click="shareAnywhere()">Share anywhere</button>
<button class="button" ng-click="shareViaTwitter('some message', null, 'http:www.baidu.com')">Share on Twitter</button>

5.好了  完成了....这个插件好像可以分享到QQ空间去的呢  当然前提是你的手机上有下载 QQ空间了...hahha

ionic cordova social media sharing plugin的更多相关文章

  1. ionic cordova platform add android Cordova failed to install plugin Error: ENOENT: no such file or directory AndroidManifest.xml

    问题描述: 在ionic 项目中出现编译android 的时候 出现 Cordova failed to install plugin  Error: ENOENT: no such file or ...

  2. ionic cordova plugin 安装和使用

    注意事项 ionic1需要ng-cordova plugin的使用都需要放到deviceready事件的回调中, 设备准备好了才能设备交互 plugin只有在真机上才有效果, 模拟器(部分)和brow ...

  3. Case Studies: Retail and Investment Banks Use of Social Media

    The past couple of months have seen an increased acknowledgement of the role social media has to pla ...

  4. ionic cordova screenshot 使用和操作

    如何调用cordova 中的screenshot插件进行截图 首先添加 ionic cordova plugin add com.darktalker.cordova.screenshot npm i ...

  5. 每日英语:Bosses May Use Social Media to Discriminate Against Job Seekers

    Many companies regularly look up job applicants online as part of the hiring process. A new study su ...

  6. Social media users of the world unite!

    Social media users of the world unite!全世界社交媒体用户联合起来!If Plato were alive today, he might well regard ...

  7. androidAndroid开发学习--Ionic+Cordova 环境搭建

    我们看 Ionic 能给我们提供什么?  一个样式库,你可以使用它 来 装饰你的 HTML 网页 ,看起来 想 移动程序的 界面,什么 header .content.footer.grid.list ...

  8. Ionic Cordova 调用原生 Api 实现拍照上传 图片到服务器功能

    Ionic 调用 Device 设备 Api 获取手机的设备信息 1. 找到对应的Api: https://ionicframework.com/docs/native/device/ 2. 安装相关 ...

  9. css social media

    css social media https://realfavicongenerator.net/ https://css-tricks.com/favicon-quiz/ <!DOCTYPE ...

随机推荐

  1. PHP 打印调用函数入口地址(堆栈)

    今天网站出现一个BUG,然后直接在数据库类里面写日志,看是哪条SQL出了问题,SQL语句到是找到了,但是不知道这条SQL语句来自何处,于是就想啊,如果能有一个办法,查看当前正在运行的这个方法是被哪个方 ...

  2. C#学习笔记三: C#2.0泛型 可控类型 匿名方法和迭代器

    前言 C#1.0的委托特性使方法作为其他方法的参数来传递,而C#2.0 中提出的泛型特性则使类型可以被参数化,从而不必再为不同的类型提供特殊版本的实现方法.另外C#2.0还提出了可空类型,匿名方法和迭 ...

  3. Linux Tcpdump 使用举例 ---持续更新

    举例: 保存到文件tcpdump -w xxx.cap(默认抓取eth0的包) 抓eth1的包 tcpdump -i eth1 -w /tmp/xxx.cap 抓到完成的数据包(默认只抓前68字节) ...

  4. iis7设置404页面不生效的原因

    打开web.config <httpErrors errorMode="Custom" existingResponse="PassThrough"> ...

  5. jQuery-ajax: 取消关注|关注

    ylbtech-jQuery-ajax: 取消关注|关注 1.A,jQuery-效果图返回顶部   1.B,jQuery-Source Code(源代码)返回顶部 <script src=&qu ...

  6. iCheck表单美化插件使用方法详解(含参数、事件等)

    iCheck   特色: 1.在不同浏览器(包括ie6+)和设备上都有相同的表现 - 包括 桌面和移动设备 2.支持触摸设备 - iOS.Android.BlackBerry.Windows Phon ...

  7. input文本框实现宽度自适应代码实例

    代码实例如下: <!DOCTYPE html> <html><head><meta charset="utf-8"><meta ...

  8. nfs不能自动mount(转载)

    From:http://www.wenzizone.com/2009/08/14/nfs_can_not_automount_supplementary.html 手动挂载nfs没有问题,说明port ...

  9. Bug 是改不完滴

  10. Replace JSON.NET with Jil JSON serializer in ASP.NET Web API

    I have recently come across a comparison of fast JSON serializers in .NET, which shows that Jil JSON ...