Question

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
Was it helpful?

Solution

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).

OTHER TIPS

You can upload your canvas image to dropbox and then use the generated url in facebook feed url - Save image to dropbox with data from canvas

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top