toDataURL("image/png") to Facebook Upload

I'm creating a little paint app, and I want to give my painters the option of publishing their work on facebook. I'm using Raphael JS to create the image. Then I'm using the HTML5 Canvas method toDataURL("image/png") to create a javascript variable that holds the .png data of the image.

Now that I have this data, I can't figure out how to let people submit it to facebook! I tried using the FB.ui() function but it seems to only let me share an established link. If I try to share the stored data, Facebook replies my url is too long. How can I have that data upload to facebook instead of linking?

Is this impossible? I've looked everywhere, and I have not found a suitable answer. I know facebook is horribly documented!



The photo connection of the user object in the graph API ( has a source property. This is where you will place the data content (multipart/form-data) of your photo.

Once you upload the photo data to the user account, it is placed in an album specially for your application. You will get the id of the new photo from the FB.api('me/photos','post',params,callbackFn); call.

Using that photo id, you can get it's url and use it however you want. You can even use it to post to the user's wall for everyone to see.

Need Your Help

How to set two ajax event for one click action in JSF 2.0

java jsf jstl

i have to implement a scenerio Like To change an image and display Text correspondingly. means two ajax at same time ... so i am writing a code like this but image is changing and it is working but

How to get a table populated with entries taken in from another screen of iOS App?

ios swift uitableview segue custom-cell

I am making a app, in which i am taking the entries of the user from one screen and processing and printing them on another screen, these two screens are not consecutive screens. the problem is, the