Reputation: 310
I'm wondering if there is any way to have a Graph Search call of type=post restrict results to a geographic location like you can when you're searching for a location for example?
I tested it using the same parameters you can use to limit a place search (center and distance) and it didn't work. I'm wondering if anyone can suggest a trick here?
I know that posts don't necessarily contain geo data which is most likely why it isn't enabled.
any suggestions?
Thanks.
Upvotes: 1
Views: 1876
Reputation: 146
You can try using "locale" param (...&locale=pt-br) or setting "Accept-language" on your http header.
Upvotes: 0
Reputation: 281
From facebook Graph Api docs docs
When retrieving Posts via the /home, /feed, or /posts connection, you can restrict the results to only those with a location attached by adding with=location to the URL parameters: /me/home?with=location
Checkins: /search?type=checkin (This request returns you or your friend's latest checkins, or checkins where you or your friends have been tagged; currently, it does not accept a q= parameter.)
Objects with location. The following will return information about objects that have location information attached. In addition, the returned objects will be those in which you or your friend have been tagged, or those objects that were created by you or your friends. There are important behavioral differences in the results depending on the permissions your app has acquired. Please see the documentation for the location_post FQL table for more information.
To search for objects near a geographical location, use type=location and add the center and distanceparameters: /search?type=location¢er=37.76,-122.427&distance=1000
To search for objects at a particular place, use type=location and specify the ID of the place. For example for Posts at Facebook HQ, use: /search?type=location&place=166793820034304
Upvotes: 2