$cordovaSocialSharing.shareViaFacebook('Message via http://talkipia.com', res.filePath, "http://talkipia.com",
function() {
console.log('share ok')
}, function(err){
console.log(err);
});
Sharing is successfully done to facebook but none of callback was called…
I dont know why.
changing $cordovaSocialSharing to window.plugins.socialsharing works.
you need to read the documentations correctly…
the native plugin uses callbacks to handle error and success case.
ngCordova is using promises to handle this:
$cordovaSocialSharing
.shareViaFacebook(message, image, link)
.then(function(result) {
// Success!
}, function(err) {
// An error occurred. Show a message to the user
});
oh…
I never read it but I read it from here…
I guess description is a bit different.
yeah but you used the ngCordova syntax… so maybe you mixed two things.
ngCordova is a wrapper for many recently used cordova plugins… to have a unified and simplified JavaScript API for them.
got it, keep learning, thanks!