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. PLSQL_数据泵导入导出数据Impdp/ Expdp(概念)

    2014-08-31 Created By BaoXinjian

  2. GL_Oracle Erp月结和年节流程讨论(概念)

    2014-02-06 Created By BaoXinjian

  3. IDC机房网络测试要求

    IDC机房网络质量要求: 我司项目目前覆盖目标机房是国内BGP机房.三线机房.电信机房.联通机房. 要求XXXX IDC机房到目标机房的网络质量,平均丢包≤0.5%,网络延迟≤50ms;高峰期平均丢包 ...

  4. 转-android图片降低图片大小保持图片清晰的方法

    http://i.cnblogs.com/EditPosts.aspx?opt=1 android里面对于图片的处理一直是个比较烦人的问题,烦人之处在于一个不小心,就有可能造成OOM. 最近碰到一个关 ...

  5. Android系统onKeyDown监控/拦截/监听/屏蔽返回键、菜单键和Home键

    在Android系统中用来显示界面的组件(Component)为Activity,也就是说只有重写Activity的onKeyDown方法来监控/拦截/屏蔽系统的返回键(back).菜单键(Menu) ...

  6. Python2.7.5 安装(转载)

    From:http://www.cnblogs.com/balaamwe/p/3480430.html From:http://www.chgon.com/?p=1340 安装python2.7.5纠 ...

  7. perl处理含有中文字符的json编码

    例子:1. 有php的 json函数生成的中文串 [root@tts177:/tmp]$/opt/php/bin/php -r 'echo json_encode(Array("a" ...

  8. 在每次request请求时变化session

    session.invalidate();//使得当前的session失效 request.getSession(true).getId();//生成一个新的session 原理: request.g ...

  9. 前后台彻底分离的核心文件bridge.js.

    具体代码可以在我的git上下载:https://github.com/guoyansi/bridge 这里的后台使用java写的,如果不了解java的童鞋可以忽略下面这样图片. bridge.js / ...

  10. IRasterClassifyColorRampRenderer 使用时的一些奇怪的地方 (转)

    1.IRasterClassifyColorRampRenderer 的Break设置方法 IRasterClassifyColorRampRenderer这个接口是ArcEngine里对单波段栅格影 ...