Filter by email using the Facebook Graph API

Here is the problem that I encountered - I want to pull the last 20 wall messages from the Facebook page using the Graph API, but only those messages that were created by this company. For example, if I pulled out the Gray Puupon Facebook page, I don’t want their fans to be on the wall, only those that Gray Pupon sowed.

From my point of view, there is no way to do this, except by pulling too much, then looping through each result and checking the data "from" to make sure that it matches the page name until this limit reaches 20. But what horribly inefficient and still not guarantee a set of results 20. Am I missing something or is this the only option?

+6
source share
1 answer

What exactly are you requesting from the API - /pageid/feed or /pageid/posts ...?

The latter should contain only your own page entries.

Alternatively, you can use the FQL stream table to filter by actor_id .

+8
source

Source: https://habr.com/ru/post/926986/


All Articles