facebook-node-sdk

Asynchronous method in while loop with Graph API paged

a 夏天 提交于 2019-12-20 04:41:31
问题 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 where the returned data is paged - I need to build something in recursive mode. Let me explain: FB.api('/me/feed?limit=5000', { access_token: token }, function(response) { // response is an object that could have as response.paging.next attribute }); Limit isn't working here, because it returns a max of 245 and returns paging object