ionic cordova social media sharing plugin
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的更多相关文章
- 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 ...
- ionic cordova plugin 安装和使用
注意事项 ionic1需要ng-cordova plugin的使用都需要放到deviceready事件的回调中, 设备准备好了才能设备交互 plugin只有在真机上才有效果, 模拟器(部分)和brow ...
- 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 ...
- ionic cordova screenshot 使用和操作
如何调用cordova 中的screenshot插件进行截图 首先添加 ionic cordova plugin add com.darktalker.cordova.screenshot npm i ...
- 每日英语: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 ...
- Social media users of the world unite!
Social media users of the world unite!全世界社交媒体用户联合起来!If Plato were alive today, he might well regard ...
- androidAndroid开发学习--Ionic+Cordova 环境搭建
我们看 Ionic 能给我们提供什么? 一个样式库,你可以使用它 来 装饰你的 HTML 网页 ,看起来 想 移动程序的 界面,什么 header .content.footer.grid.list ...
- Ionic Cordova 调用原生 Api 实现拍照上传 图片到服务器功能
Ionic 调用 Device 设备 Api 获取手机的设备信息 1. 找到对应的Api: https://ionicframework.com/docs/native/device/ 2. 安装相关 ...
- css social media
css social media https://realfavicongenerator.net/ https://css-tricks.com/favicon-quiz/ <!DOCTYPE ...
随机推荐
- C# new 和 override.
http://www.dotblogs.com.tw/skychang/archive/2012/05/10/72114.aspx?fid=60865
- Navicat(连接) -1高级设置
高级设置 设置位置当创建一个新的连接,Navicat 将在设置位置创建一个子文件夹.大多数文件都保存在该子文件夹: Navicat 对象 服务器类型 扩展名 查询 全部 .sql 导出查询结果设置文件 ...
- javaweb工程,Servlet里面获取当前WEB跟路径的文件绝对路径地址
String base_Url = request.getSession().getServletContext().getRealPath("/"); String window ...
- DG_Oracle DataGuard作用和概念(概念)
2014-06-03 Created By BaoXinjian
- CF 500D New Year Santa Network tree 期望 好题
New Year is coming in Tree World! In this world, as the name implies, there are n cities connected b ...
- 关于maven的一些常见用法
1: 查看插件的目标信息:mvn help:describe 2: 生成javadoc并指定编码:mvn javadoc:javadoc -Dencoding=UTF-8 -Dcharset=UTF- ...
- bug_ _ 常见的bug1
===== 3 java.lang.reflect.InvocationTargetException 异常解决方法 在做djunit测试的时候,发生下面异常: java.lang.reflec ...
- dbs:apple-notes
ylbtech-dbs:apple-notes -- =============================================-- apple_备忘录-- auhtor:Yuanbo ...
- MethodNotAllowedHttpException
原因:1.没有加表单{{csrf_field()}}:2.除get提交以外,其它提交方式都要csrf_token();3.提交的路由非法,没有定义.
- MySQL利用Navicat导出数据字典
这里算是一个小技巧 利用mysql的information_schema中的COLUMNS表 和navicat中的导出功能实现快速导出数据字典 CREATE TEMPORARYTABLE `COLUM ...