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. C# 多线程网络通信

    博客园 :梦工厂2012 本月由于事情太多,没能有太多的时间去写博客.不过还好在月底抽时间写了这个多线程网络通信的程序 .程序说明:控制端 创建一个写线程threadWrite和一个读线程thread ...

  2. Storm的数据处理编程单元:Bolt 学习整理

    Bolt是Topology中的数据处理的单元,也是Storm针对处理过程的编程单元.Topology中所有的处理都是在这些Bolt中完成的,编程人员可以实现自定义的处理过程,例如,过滤.函数.聚集.连 ...

  3. Hbase与hive整合

    //hive与hbase整合create table lectrure.hbase_lecture10(sname string, score int) stored by 'org.apache.h ...

  4. Linux命令(20)查看当前网速

    Linux查看网络即时网速 sar -n DEV 1 100 1代表一秒统计并显示一次 100代表统计一百次 还可以使用ntop工具

  5. [实变函数]5.5 Riemann 积分和 Lebesgue 积分

    1 记号: 一元函数 $f$ 在 $[a,b]$ 上的 (1)Riemann 积分: $\dps{(R)\int_a^b f(x)\rd x}$; (2)Lebesgue 积分: $\dps{(L)\ ...

  6. SteamVR Unity工具包(VRTK)之概览和控制器事件

    快速上手 · 克隆仓库  git clone https://github.com/thestonefox/SteamVR_Unity_Toolkit.git · 用Unity3d打开SteamVR_ ...

  7. git添加标签(转载)

    From:http://git-scm.com/book/zh/v1/Git-%E5%9F%BA%E7%A1%80-%E6%89%93%E6%A0%87%E7%AD%BE 打标签 同大多数 VCS 一 ...

  8. PyDev-Python的Eclipse插件安装

    PyDev官网:http://marketplace.eclipse.org/node/114 安装方法: 1,打开Eclipse,如果是初次使用,关闭欢迎页面,否则无法按照我说的方法安装. 2,打开 ...

  9. mysql 错误1054

    问题,当查询数据时,输入字符串是数字时,可以查询,但当输入字母字符串时却不能查询,总是提示错误1054 解决:将字符串打上单引号 字段对应的值如果为字符或字符串类型的时候,应用英文单引号括起来,你用的 ...

  10. 创建一个hibernate helloword

    1.下载hibernate包 http://hibernate.org/orm/ 点download下载最终版 安装hibernate插件hibernatetools 2.创建一个java工程 导入必 ...