0

I'm using the facebook search API to get public posts. I want to filter it by country from which it was posted from. The place search graph api has a way to do this - by appending center and distance as query parameters. But the search api for type 'posts' does not respond to center or distance query parameters. I've looked into this SO question as well, but none of the answers have helped me accomplish my task.

As of now, the only solution I can think of is using a library to figure out the locale from the post string itself.

Note: I also thought of getting the user's location and then doing my own filtering, but that doesn't work either because I don't have the permissions to view the location/hometown of the user.

Anybody done this before?

Community
  • 1
  • 1
zacropetricopus
  • 407
  • 1
  • 5
  • 12

1 Answers1

0

https://developers.facebook.com/docs/reference/fql/location_post/ shows how you can read posts with location information. If that's not available, you could use the locale information in the User object from the Graph API, but that's not always visible/available either. Language detection (as you suggested in the question) may not be a great idea unless you have very specific needs. But, if the post language is in English, it's nearly impossible to tell the location considering the popularity of the language around the world.

theonova
  • 21
  • 2
  • thanks for your answer. but, location_post link does not provide a way to find the location data for a **public** post. reg: locale information in user object - I'm noticing that a lot of people have their locale set to en_US but post in a different language other than English. – zacropetricopus Mar 28 '12 at 23:15
  • Yes, like the link says, you can get the location information under certain conditions only. It looks like locale from the User object isn't a good idea either. Since the location information of posts falls under read_stream, you need Extended Permission for it - it isn't clear to me how that works for public posts though. From what I've seen in the "Searching" section the Graph API documentation on https://developers.facebook.com/docs/reference/api/, I don't see any location information available in the objects for public posts. – theonova Mar 30 '12 at 06:22