Tried accessing nonexisting field (audience) on node type (Page)

396 Views Asked by At

I tried using Page Affinity in documentation, and I tried using this endpoint

https://graph.facebook.com/v2.10/197010460481516?fields=audience&access_token=TOKEN

"(#100) Tried accessing nonexisting field (audience) on node type (Page)",

And also tried

https://graph.facebook.com/v2.10/197010460481516?fields=facebook&access_token=TOKEN

Same error:

"(#100) Tried accessing nonexisting field (facebook) on node type (Page)",

What am I doing wrong? I have been trying all combinations like trying page_id (which is above example and what it says in the documentation) and AdInterest_id but no luck. Still getting the same error. Isn't it supposed to work? What am I missing?

Does it has to be authenticated user's page?

1

There are 1 best solutions below

0
On

Could be a quite outdated question but I still want to provide an answer.

The answer is: you are using the wrong user ID.

So strangely (possibly because of their old code), Facebook is using the same ID field for all accounts across all categories. And they have their own way to determine which category this account is by just seeing the ID.

And in this specific case you are doing, I am pretty sure that you are using an ID for a Facebook Business Page which does not contain the field "audience" or "facebook". You may want to read the related doc again and see which is the proper type of ID you should be using.

By the way, the doc you are referring to here has already become invalid. I hope you have already found your solution.