theharshest
theharshest

Reputation: 7867

Facebook Graph API returns no content (empty data array)

I'm using Python's requests to extract data from Facebook pages using Facebook Graph API as follows -

r = requests.request("GET", "https://graph.facebook.com/VisaUnitedStates/feed", params={'until':1364423876, 'access_token':oath_access_token, 'limit':900})
r.content
'{"data":[]}'

But it returns an empty data array as seen above. Same query works fine in Facebook graph explorer, so there is no issue related to permissions (Also, I've added all the permissions to the access_token). What can be the problem here?

I've seen many other similar questions, but nothing is helping me here.

Upvotes: 0

Views: 1161

Answers (1)

Sahil Mittal
Sahil Mittal

Reputation: 20753

Since the facebook page for which you are making the request is public, the access token could not be the issue; since any valid access token works for reading the public pages feed.

The problem is with the until parameter I guess. Check the official documentation, there is no such paramter until. So, if you want to get the feeds upto a certain time, you should use the FQL query instead using created_time parameter.

Hope that helps.

Upvotes: 1

Related Questions