1

When using the Facebook Graph API, e.g: this syntax:

https://graph.facebook.com/v2.2/[username]/posts?locale=en_gb&access_token=[access_token]

I found it returns all posts by the Facebook page (including posts targeted at different regions, e.g. UK, Peru, Russia and therefore the same post - but in different languages.

We used this method to create a permanent access token by the way (Long-lasting FB access-token for server to pull FB page info)

Is there another method, to pull published posts from a page feed - with a filter on the targeted locale and/or location? It doesn't look like the Page Feed Graph API supports this filtering? (https://developers.facebook.com/docs/graph-api/reference/v2.2/page/feed).

Would Facebook Query Language cater for this?

Community
  • 1
  • 1
mattpark22
  • 741
  • 2
  • 14
  • 26
  • FQL is going away for good end of April 2015, so that is out of the question. What page feed items you will get, depends on the access token you are using. If you want only specific targeted posts, then you need to use a user access token to make the request, because targeting only applies to users. The user the access token is “for” must be one that satisfies the targeting criteria. – CBroe Feb 26 '15 at 11:45
  • Thanks for the comment, as this data is to be automatically pulled (with a permanent access token) to show published posts targeted at a certain location/region. How would we go about creating an access token that only has this location filter built in to it? I can only see the locale option to change when generating the access token, but the posts are been created on location, not locale - so it makes no difference to the feed. The user access token part confusing me, as I'm not sure how to make a permanent one for the website to automatically pull the data. – mattpark22 Feb 26 '15 at 14:52
  • You can not get a permanent user access token, you can only extend them to be valid for up to 60 days. After that (or when another action, such as the user changing their password, invalidates the token), it would have to be renewed. – CBroe Feb 26 '15 at 15:38
  • Okay thanks, please could you link me to a guide or give a brief description on how to create a user access token, and how you renew it after 60 days. As I'm a bit lost with it all. – mattpark22 Feb 26 '15 at 16:51
  • https://developers.facebook.com/docs/facebook-login/v2.2, and for the extending part specifically https://developers.facebook.com/docs/facebook-login/access-tokens – CBroe Feb 26 '15 at 16:55

0 Answers0