I am creating a Phonegap application that saves the contents of the canvas on a camera roll (I do this with Canvas2ImagePlugin), now I would like to share this saved image using the SocialSharing PhoneGap plugin, but I need to fill in the URI field of the image to use the plugin. How can i do this?
I have a saveImage () function, which pretty much does what it says: it launches the plugin, saving my canvas, to the image and warnings when the image is saved in the camera roll.
var canvas = document.getElementById("canvas");
var context = canvas.getContext("2d");
window.canvas2ImagePlugin.saveImageDataToLibrary(
function(msg){console.log(msg);},
function(err){console.log(err);},
document.getElementById('canvas')
);
alert("Saved!");
I am open to other solutions for sharing (fb and twitter) the contents of my canvas. Thanks