skip to Main Content

The API lacks some clear explanations on retrieving the reachestimate for either an ad account or an ad. I have made sure that:

  • I am an admin/ or added to a Facebook app
  • I have a paid advertising campaign
  • The adaccount ID is added in the Settings Advanced panel of the Developer App page

I’ve been trying to:

  1. In Graph API Explorer, retrieve the data by query expansion: me?fields=adaccounts{campaigns{adsets{ads{reachestimate}}}}. However, I always get one of the following (randomly):
    Error 1
    Error 2
    Error 3

  2. Still in the explorer, retrieve it by direct access: act_{adaccount_id}/reachestimate I get this, even if I am 100% sure the ad account is added in the Advanced Settings panel:
    Error 4

  3. Both of 1 and 2 in the iOS project. I get this: com.facebook.sdk.core error 8

  4. Test it by curl with the example from here. I get this (the same with the one from point 2): The ad account is not enabled for usage in Ads API.

Just as a further note, for point 1 that’s not the whole query, but I didn’t write the adjacent fields because they would’ve been redundant for the purpose of this question.

I simply need to retrieve the ad accounts, the campaigns, the ad sets and the reach estimate simultaneously in the same query. It seems like a dead spot for me. Do you have any suggestions? Can you show me a Graph API explorer working example? Or, if what I’m asking is impossible, can you simply show some code that works?

2

Answers


  1. Chosen as BEST ANSWER

    Apparently, I got:

    Please reduce the amount of data you're asking for, then retry your request.
    

    Because the query was to broad. Those 'adjacent' fields actually triggered a massive query, so the solution was to either:

    1. Put a limit(1) on the campaigns.
    2. Individually retrieve the reachestimate for each adset.

    I chose the latter because it suited my needs, but it's up to you which solution works better.


  2. Are you app and ad account owned by the same person?

    Facebook Ads API has tiered access. https://developers.facebook.com/docs/marketing-api/access

    A newly registered app is in Development Tier and can only access the user’s own ad accounts. You need to make some API calls on your own ad account for testing in order to get promoted to Basic Tier and manage other people’s ad account.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search