This code works for social sharing in your ionic v1 application.
At first, you will be add Cordova Plugin using bellow link……
cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git
then, set the bellow code in your controller. And this controller will be work by calling ng-click function.
ionicApp.controller("ExampleController", function($scope, $cordovaSocialSharing) { $scope.shareFunction = function(){ $cordovaSocialSharing .share(null, null, null, "https://play.google.com/store/apps/details?id=com.swapan.html5&hl=en") .then(function(result) { // Success! }, function(err) { // An error occurred. Show a message to the user }); } });
Question and answer is powered by AnsPress.io