Question: Facebook Graph API - me/accounts/ edge returning too many results and duplicate pages

Question

Facebook Graph API - me/accounts/ edge returning too many results and duplicate pages

Answers 0
Added at 2017-11-30 19:11
Tags
Question

The Short Version:

I need to get the same list of pages that is shown on the 'Manage Pages' page (www.facebook.com/bookmarks/pages), but the graph.facebook.com/vX.XX/me/accounts edge returns almost twice as many results as I need (not including duplicates and other bad data). Is there a way that I can get exactly the same result set that appears on the 'Manage Pages' page under the 'Pages' heading?

The Long Version:

I've been trying to use the Facebook graph API to get the list of pages that appear under the 'Pages' heading when I go to the 'Manage Pages' page on the Facebook website (i.e. www.facebook.com/bookmarks/pages).

I've been using the graph.facebook.com/vX.XX/me/accounts edge to retrieve the pages, which should work according to all of the resources I can find.

After paging through and collecting all of the results, I should have ~220 unique pages (uniqueness is currently determined with page ids). Instead, the result set I get is something that can only be described as chaotic: 900-930 unique pages (450-550 of which are child location pages of the other ~400 pages), and anywhere from 300 to 11000 duplicate pages. Adding the summary.total_count property to my query reveals that there are aproximately 963 pages under the /me/accounts edge, although I've never successfully retrieved quite that many unique pages.

I've tried a number of things to change my query to get better results to no avail. Some of the things I've tried:

  • Using the is_place filter. false consistently returns the same 82 results, which is great except I'm looking for ~220. true returns 800-860 results, both too many and inconsistent.
  • Using the is_business filter. false consistently returns the same 406 results, but that's still twice as many as I'm looking for. true returns 130-160 results, which is closer but still not enough and still inconsistent.
  • Finding something useful in business_id. I figure out that the /me/businesses edge will give you all of the items under the 'Business Manager' heading on the 'Manage Pages' page. Unfortunately the pages owned by these businesses don't appear in the 'Pages' list.

Which brings me to the question itself: Is there a way that I can get exactly the same result set that appears on the 'Manage Pages' page under the 'Pages' heading?

Any information that can help me understand why I'm getting these massive result sets with so many duplicate items is also welcome, even if it doesn't directly answer the question.

Answers to

Facebook Graph API - me/accounts/ edge returning too many results and duplicate pages

Source Show
◀ Wstecz