We can use the Graph API to upload an image file to Facebook by either sending the raw file bytes data or the bitmap data of the image to a Graph API Connection—which itself can be either a specific Album, /ALBUM_ID/photos
, or a User's Photos connection, /PROFILE_ID/photos
.
In this recipe, we're going to build a Flash Player-based application which leverages Flash Player 10+ FileReference
class to build an application that can upload an image file from the user's local machine to either a new or existing Facebook Album.
In this recipe, we will be creating an interface which looks like this:
Such an interface allows us to upload Photos to either a user's existing Album or to the user's profile.