I would like for the user to share client side image on facebook with the feed dialog or other approach
FB.ui({ method: 'feed',
caption: 'Mega Tangram Picture',
message: 'I made this tangram picture on MegaTangram',
picture: canvas.toDataURL("image/png;base64;")
}, function(response){console.log(response);});
Its not working with the dataURL
standard, is there another way to do this (graph api?), it must be possible to share dynamically created images that are not held on the server?
The error I got was:
An error occurred. Please try again later.
API Error Code: 100
API Error Description: Invalid parameter
Error Message: picture URL is not properly formatted
checkupdatefeed result parameter= undefined script.js:1183
checkupdatefeed result parameter= 1390679958266:9.4.0
When trying with image/jpeg;base64
, I get the following error:
Could not find callback 1
As far as I know, it's not possible. When you share something in the feed, Facebook needs to be able to fetch the image from a public URL.
picture: The URL of a picture attached to this post.
Source: Feed and Share Dialogs
You need to upload the image somewhere first (for instance Amazon S3).