From this SO question on the topic and from our research elsewhere on the web (like this Facebook doc link), it seems possible to upload an image from canvas.toDataURL() to Facebook directly -- without hosting the image on a server.
This is for a PhoneGap app.
Uploading a canvas as a picture on the server is possible. I did a test 2 years ago, you can look up the code: http://standupweb.net/canvas/swSaveCanvas.php
That was using mootools, but it is really not needed there, everything in the save function is native JS code.
Integrating that with facebook should not be a big problem