使用Android和图形API创建的Facebook相册
我们在使用Android和图形API创建的Facebook相册的一个问题。我们已经能够上传照片使用图形API到Facebook。我们使用以下上传照片到Facebook。
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.
捆绑PARAMS =新包();
params.putString(法,photos.upload);
params.putString(称号,uploadFile.getName());
params.putString(隐私,{值:每个人都'});
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\");
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");
以上code将有助于创建一个 ALBUMNAME 新相册并返回被Facebook所产生的相册ID。
Above code will help create a new photo album with the albumName and return the album id generated by facebook.