Camera plugin + cordova social sharing


hi, I’m using the camera plugin to take a photo, and I want to share that photo with the cordova social sharing plugin, but I don’t know how…

the camera works fine, and shows me the photo i’d taken

ionicApp.controller(“functions”, function($scope, $rootScope, $cordovaCamera) {

$rootScope.takePicture = function() {
    var options = { 
        quality : 75, 
        destinationType : Camera.DestinationType.DATA_URL, 
        sourceType : Camera.PictureSourceType.CAMERA, 
        allowEdit : true,
        encodingType: Camera.EncodingType.JPEG,
        targetWidth: 300,
        targetHeight: 300,
        popoverOptions: CameraPopoverOptions,
        saveToPhotoAlbum: false

    $cordovaCamera.getPicture(options).then(function(imageData) {
        var image = document.getElementById('myImage');
        $rootScope.imgURI = "data:image/jpeg;base64," + imageData;
    }, function(err) {
        // An error occured. Show a message to the user


ionicApp.controller(“share”, function($scope, $cordovaSocialSharing) {

$scope.shareAnywhere = function() {
    $cordovaSocialSharing.share("#DSTRY_CAM", "#DSTRY_CAM", "www/imagefile.png", "http://DSTRYCAM.COM");


but how i can put the photo taken before in this share function? I believe is changing the “www/imagefile.png” but I don’t know how.

thank you, and sorry for my bad english