使用Android和图形API创建的Facebook相册 [英] Create photo album in facebook using android and Graph api

查看:307
本文介绍了使用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.

这篇关于使用Android和图形API创建的Facebook相册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆