pablobarbera / Rfacebook

Dev version of Rfacebook package: Access to Facebook API via R
http://cran.r-project.org/web/packages/Rfacebook
350 stars 250 forks source link

Pagination does not work if api argument is not NULL #115

Closed kasperwelbers closed 7 years ago

kasperwelbers commented 7 years ago

Specifically, I encountered this error when using getPage with n > 25 and api = '2.6'.

The url for the next page (content$paging$next) already contains the API version, which results in an error if callAPI adds it a second time. My simple fix was to make sure the api argument in callAPI is NULL if callAPI is within a pagination loop, but perhaps fixing this within callAPI is more elegant.

pablobarbera commented 7 years ago

Great suggestion! Thanks @kasperwelbers