This article explains how to upload a photo to Facebook with the Graph API, directly from a Canvas element. No server is needed, as in my recent article about Facebook upload with FormData.
javascript sdk
Facebook JavaScript SDK – Photo upload with FormData
Uploading a photo to Facebook is quite easy if the photo is on a server already. This tutorials explains how to upload a photo to Facebook directly from the device with FormData, without the need to upload in on a server first.
Facebook API – Login with the JavaScript SDK
I´ve seen a lot of weird coding happening around Login with the Facebook JavaScript SDK, so here is one good solution with explanation.