这是Javascript:
此代码的目的是获取最近 3 个月内用户的帖子数。
FB.api('/me/photos?fields=created_time&since=2013-03-28', function(response){
dLen = response.data.length;
if(!response.paging.next){
dLenContent = "<div><span class='left'>"+i+++".</span><span class='mid'> Number of times tagged in photos: </span><span class='right'>"+dLen+"</span></div>";
}
else{
nextURL = response.paging.next;
while(nextURL){
graphURL = nextURL;
---------------------------------------
---How to fetch data from next page(graphURL)?---
---------------------------------------
dLen = dLen + response.data.length;
nextURL = response.paging.next;
}
}
pInfo = document.getElementById("personalInfo");
pInfo.innerHTML += dLenContent;
});
如果有下一页,将执行代码的 else 部分。在 else 部分中,我编写了一个 while 循环,该循环将一直处于活动状态,直到我们获得对象的下一页为止。
我想知道获取“response.paging.next”的数据?