从Graph API URL获取android中的Facebook照片
在android上,我使用的是Facebook SDK 4.0。我想获取通过Facebook登录的用户的所有照片 我有这个网址从Graph API URL获取android中的Facebook照片,android,facebook,photos,Android,Facebook,Photos,在android上,我使用的是Facebook SDK 4.0。我想获取通过Facebook登录的用户的所有照片 我有这个网址 如何解析和生成要在ListView中查看的图像?您必须使用以下代码才能获取用户的所有照片 /* make the API call */ new GraphRequest( AccessToken.getCurrentAccessToken(), "/{user-id}/photos", null, HttpMethod.GET,
如何解析和生成要在ListView中查看的图像?您必须使用以下代码才能获取用户的所有照片
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{user-id}/photos",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();
为额外参数设置
Bundle
,如板条箱aBundle
为所需参数,例如:
Bundle parameters = new Bundle();
parameters.putString("fields", "id, picture");
然后将其设置为
GraphRequest
,您能告诉我如何在ListView中解析和加载图像吗?@Gissipi_453您必须将json解析为一个简单的json解析,我们用于解析json,对于加载图像,您必须使用通用图像加载工具谢谢。但是你能给出一个简单的jsonParsing的例子吗?如何从上面的代码中获取图像链接?在我得到URL后,我可以自己更新ListView。重复您之前的问题,您可以添加更多的上下文和文档链接。