开发者

Create photo album in facebook using android and Graph api

开发者 https://www.devze.com 2023-02-18 19:15 出处:网络
We have a problem creating photo album in facebook using andro开发者_StackOverflow中文版id and graph API. We already have been able to upload photos to facebook using Graph API. We are using following

We have a problem creating photo album in facebook using andro开发者_StackOverflow中文版id 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消