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. Exception error message with incorrect line number

    In Release mode the number in front of the exception is NOT the line of code. Instead it's an offset ...

  2. RMAN_学习实验2_RMAN Duplicate复制数据库过程(案例)

    待整理 对于基于生产环境下的数据库的版本升级或者测试新的应用程序的性能及其影响,备份恢复等等,我们可以采取从生产环境以克隆的方式将其克隆到本地而不影响生产数据库的正常使用.实现这个功能我们可以借助rm ...

  3. DBA_Oracle Startup / Shutdown启动和关闭过程详解(概念)

    2014-08-07 Created By BaoXinjian

  4. UVA116 单向 DSP(多段图最短路)

    单向 DSP [题目链接]单向 DSP [题目类型]dp &题解: 紫书P271 这块的字典序排序我觉得挺厉害的,每次都把那3步sort一下,之后if (v< d[i][j]) 这块的小 ...

  5. codeforces 258C Little Elephant and LCM 组合数学 枚举

    题意: input : n a1,a2,...,an 1 <= n <= 10^5 1 <= ai <= 10^5 求b数组的方案数,b数组满足: 1. 1 <= bi ...

  6. c++学习-字符串

    字符数组和 string类型比较的区别 #include<iostream> #include<string> using namespace std; class area{ ...

  7. python(14)类,方法,对象,实例

    类: 简单来说就是一个函数的集合,在这个集合里面你定义了很多个函数: 方法:其实就是你定义的这些函数. 对象:简单来说就是自身具有多个属性(也可以说是子变量)的变量而已. 在下面的例子中class P ...

  8. (Delphi) Windows 32 API程序设计目录

    这里所有程序均使用Delphi调用Windows 32 API方式实现,并不是使用VCL已经封装好的类实现的! (一)第一个窗口程序 01 创建第一个窗口.

  9. centos7安装mysql

    centos7安装mysql 1 查找系统是否安装了myql rpm -q mysql mysql-server1.1如果安装了.就删除 sudo yum -y remove mysql mysql- ...

  10. {JavaScript}栈和堆内存,作用域

    1.栈 stack”和“堆 heap”:         简单的来讲,stack上分配的内存系统自动释放,heap上分配的内存,系统不释放,哪怕程序退出,那一块内存还是在那里.stack一般是静态分配 ...