Closed P8H closed 2 years ago
If you use fb.page.get_posts
, paging is inside,
You want get all posts, You can use follows:
FacebookApi(app_id="", app_secret="", access_token=token)
rs = fb.page.get_posts(page_id, count=None, limit=100)
But, this may have some errors unexpected if page have too many posts. So you can get it month by month.
FacebookApi(app_id="", app_secret="", access_token=token)
rs_p1 = fb.page.get_posts(page_id, count=None, limit=100, since='2021-10-01', until='2021-11-01')
rs_p2 = fb.page.get_posts(page_id, count=None, limit=100, since='2021-11-01', until='2021-12-01')
BTW, since and until can only in six month.
Or, you can use base api GraphAPI
and use method get_connection
to do paging by hand.
Thank you very much, this helps a lot
Hi, I am using the FacebookApi and want to download all posts from my facebook page. I see, that the returning FeedResponse doesn't contains every post but instead includes a paging attribute. Question: How to retrieve all posts?
My code so far:
Thanks for help