Asynchronous method in while loop with Graph API paged

后端 未结 2 954

I\'m using facebook node sdk for node.js to get information from a facebook user such as their feed and friends, which is working fine.

However I\'m having an issue wher

2条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-25 04:25

    Instead of using:

    feedItems.concat(response.data);
    

    I have made: (if is the case on response.data has the data)

    for(var i in response.data){
       feedItems.push(response.data[i]);
    }
    

提交回复
热议问题