How can I limit the result from the /posts connection on a Page to posts targeted to a specific country or language using the Graph API?
When posting to a Page directly on the site or via the Graph API, you can specify targeting to c开发者_运维百科ountry , city , region and locale. When loading the /posts connection on the Page, every post is included. How can it be limited to a specific targeting?
Ok, I found a solution using FQL stream. I'll put the answer here in case someone else needs it.
Example, selecting only post for Sweden:
fql?q=SELECT post_id, message, privacy FROM stream WHERE source_id=pageIdHere AND filter_key="owner" AND privacy.description = "Sweden"
Or posts for Spain:
fql?q=SELECT post_id, message, privacy FROM stream WHERE source_id=pageIdHere AND filter_key="owner" AND privacy.description = "Español, Español (España)"
https://developers.facebook.com/docs/reference/fql/stream/
精彩评论