我的 restFB 代码导致在一个应用程序上写入我的 ArrayList。我需要 arraylist 正确填写 JSON 中返回的 appIds 的数量。有什么见解吗?
这是我的代码:
public List<String> fetchAppIdsForUser() {
Connection<FacebookApp> appList = getClient().fetchConnection("me/applications/developer", FacebookApp.class);
List<String> appIds = new ArrayList<String> ();
for (List<FacebookApp> appListTwo : appList) {
for (FacebookApp app : appListTwo) {
appIds.add(app.getAppId());
}
}
return appIds;
}
以下是 JSON 中返回的内容:
{
"data": [
{
"name": "x",
"namespace": "x",
"id": "x"
},
{
"name": "xx",
"namespace": "xx",
"id": "xx"
},
{
"name": "xxx",
"namespace": "xxxx",
"id": "xxxxx"
},
{
"name": "xxxx",
"namespace": "xxxxx",
"id": "xxxxx"
}
],
"paging": {
"next": "https://graph.facebook.com/xxxxx/applications?type=developer&format=json&access_token=XXXXXXXX"
}
}