views:

27

answers:

1

I'm trying to get facebook's stream.publish to make a wall post that includes some custom text and a dynamically generated image from the site. The Image is only available as Base64 as it is drawn by the user before the publish action is initiated. Facebook doesn't seem to like the src being passed in as a Base64 string. Does anyone know a workaround or will I be forced to save the image to server first and then provide a link (I'd really rather not do this).

A: 

You cannot pass base64 image to Facebook in JavaScript. You'll need to send it to your server and convert it to a png/jpeg or something and upload it to Facebook from there (this will need user permissions of some sort). Either that, or store it on the server and then use the URL that will serve a png/jpg in JavaScript.

daaku
That's what I was afraid of. Oh well, server storage it is. Thanks
Chris