After some hardwork I have some code that uploads an image to Facebook, but now the problem is that it always creates a new album.
I want to modify the code so that it only creates an album if there isn’t already one with that name; otherwise, just upload the image to the existing album.
My code for uploading images: Upload photos to Facebook Album from an app
The API allows you to upload an image to an existing album for your app. Simply POST to https://graph.facebook.com/USER_ID/photos – The photo will be published to an album created for your app. We automatically create an album for your app if it does not already exist. All photos uploaded this way will then be added to this same album.
If you want to add images to a specific album, you must POST to https://graph.facebook.com/ALBUM_ID/photos – The photo will be published to a specific, existing photo album, represented by the ALBUM_ID.
A detailed How-To Guide is here: https://developers.facebook.com/blog/post/498