Open dimnls opened 8 years ago
Same problem here
Had the same issue, but as a quick workaround you can do the following:
Instead of placing a 'static' URL, you can use a 'data' URL, like:
window.plugins.socialsharing.share('test', null, 'data:image/png;base64,R0lGODlhDAAMALMBAP8AAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAUKAAEALAAAAAAMAAwAQAQZMMhJK7iY4p3nlZ8XgmNlnibXdVqolmhcRQA7', null, function(e){alert("success: " + e)}, function(e){alert("error: " + e)});
credits to this demo
Hi @EddyVerbruggen and thanks for the great plugin! I successfully managed to make it work and share an image when providing an external url (http://....) but I cannot manage to share a local image.
I tried passing 'images/myimage.png' which is the folder inside /www that the image is stored in, and GapDebug gives me the following error: The injected error callback of 'share' received: "URL_NOT_SUPPORTED" and the image is not loaded in the FB app.
I have also tried with 'myimage.png' and 'www/images/myimage.png' to no success.
I also tried 'file///myimage.png', Facebook seems to understand it's about to share an image but it cannot access it (image is blank and upload fails). This is after I added
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
in AndroidManifest.xmlFor reference, this the function I'm using:
I'm working on Ionic Framework 2 beta. Looking forward to any help!