getting only the posts that have location data

58 views Asked by At

I am trying to get the posts of a user only if those posts have location data. location is nested under place in user's `posts'. How do I write a graph api query that would get me all the posts of a user ONLY if those posts have location?

With this query, https://graph.facebook.com/v2.3/me?fields=id,name,posts.limit(25).until(1399832709).with(location){place}, I am getting what I want, but only a subset of the total. I know it's subset because it's only returning 2 posts with location data when I know there are at least 50 posts. So I thought if I removed limit(25).until(1399832709) from the query, it would now give me all posts that have location. But nope. I get absolutely nothing back.

Could anyone please advise on how I can structure the query correctly? If there are facebook engineers out there reading this, please help! Thank you very much.

1

There are 1 answers

0
Tobi On

I think the problem might be the {place} at the end. Have you tried

/me/posts?with=location&limit=50&until=1399832709&fields=id,place

Furthermore, as far as I know, if you remove the limit parameter, it will apply the standard limit, and not show all.