【发布时间】:2017-03-11 20:52:48
【问题描述】:
我想阅读他/她或从他们墙上可见的朋友页面或群组等发布的 Facebook 登录用户提要/故事。
我能够完成登录,阅读用户帖子。但我无法弄清楚我是如何阅读其他用户的帖子/提要的,而这些用户通常在打开 Facebook 专有应用程序时从朋友、页面或群组中看到。
我能想到的唯一解决方法是阅读朋友列表和他们的帖子,并在当前登录的用户帖子中显示它们。不知道为什么当我使用 me/feed 或 me/posts 时会得到相同的结果。
Bundle params = new Bundle();
params.putString("fields", "message,created_time,id,full_picture,status_type,source,comments.summary(true),likes.summary(true)");
params.putString("limit", "100");
/* make the API call */
new GraphRequest(AccessToken.getCurrentAccessToken(), "/me/feed", params, HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
System.out.println("Festival Page response::" + String.valueOf(response.getJSONObject()));
try {
JSONObject jObjResponse = new JSONObject(String.valueOf(response.getJSONObject()));
System.out.println(jObjResponse);
}
catch (Exception e) {
e.printStackTrace();
}
}
}
).executeAsync();
}
【问题讨论】:
标签: java android facebook facebook-graph-api