skip to Main Content

I am trying to access campaigns of the facebook account. Using python lib: https://github.com/facebook/facebook-python-ads-sdk

Receive error: (#100) Tried accessing nonexisting field (campaigns) on node type (AdAccount)

Url: https://graph.facebook.com/v2.11/{account_id}/campaigns

Everything worked fine for months. Now, even facebook page for this url is empty: https://developers.facebook.com/docs/marketing-api/reference/ad-account/campaigns/

Any thoughts, what’s the problem?

2

Answers


  1. Chosen as BEST ANSWER

    Seems to be a bug. Reported here: https://developers.facebook.com/bugs/707332642990208/

    Works perfectly without time_range param. So, could be temporary solution.


  2. I don’t know if this is a bug or not: facebook does this from time to time and is implementing check routines for parameters – in fact “adaccounts don’t have any parameters:facebook api reference adaccount reading)

    The error you are getting (#100) says “invalid parameter” (facebook reference adaccount validation rules), this is, because you may have defined the time_range and you are asking api for campaigns in an adaccount. But: for adaccount edge time_rage parameter is invalid.

    The solution is to FIRST asking api for https://graph.facebook.com/v2.11/{account_id}/campaigns and after this defining the (time_range) parameter(s) for the insights of your campaign.

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