Shiv Shankar
Shiv Shankar

Reputation: 1067

How to get all of the Facebook Graph API page feed?

Using Python:

from facepy import GraphAPI  
key = 'My Access_Token'
a = GraphAPI(key)
response = a.get('Page_ID/posts')
print response

If I run this code, It shows me data in JSON format! And Limited Data. I want to get Years of feeds from my page.

In response I get Next tag URL: If I put this URL in Browser I can access more data. In one request we can fetch 200 feeds at a time.

How can I get data in bulk? I want to collect data of 5 years from public page!

Upvotes: 3

Views: 2449

Answers (1)

Hupfauer
Hupfauer

Reputation: 591

Facebook's GraphAPI uses paging for API responses: If you query v2.5/{page-id}/posts then the result will provide you with a data array and beneath this there is the paging section. You get the "previous" and "next" query string you just have to call again and again. API won't allow you more than 100 results per "page".

Upvotes: 3

Related Questions