sshah
sshah

Reputation: 184

Create photo album in facebook using android and Graph api

We have a problem creating photo album in facebook using android and graph API. We already have been able to upload photos to facebook using Graph API. We are using following for uploading a photo to facebook.

Bundle params = new Bundle(); params.putString("method", "photos.upload"); params.putString("title", uploadFile.getName()); params.putString("privacy", "{'value':'EVERYONE'}");

facebook.request("https://api.facebook.com/restserver.php?method=photos.upload",params,"POST");

Please let us know if anybody aware of. We have searched a

Upvotes: 1

Views: 4338

Answers (1)

sshah
sshah

Reputation: 184

I have found the working solution for the above problem.

Bundle params = new Bundle();
params.putString("name", albumName);
String response = mFacebook.request("https://graph.facebook.com/me/albums",params,"POST");
String albumId=Util.parseJson(response).getString("id");

Above code will help create a new photo album with the albumName and return the album id generated by facebook.

Upvotes: 1

Related Questions