How do I get the campaigns list through the ads API on Facebook?

后端 未结 2 677
迷失自我
迷失自我 2021-02-06 15:22

I am trying to get the campaigns list from the Graph API Explorer. I\'m using the request found at https://developers.facebook.com/docs/marketing-api/reference/ad-account/

2条回答
  •  無奈伤痛
    2021-02-06 16:21

    I similarly was having problems trying to retrieve a list of all campaign IDs within an ad account.

    I already am able to retrieve campaign data by ID, so I obviously have permissions already.

    But the Facebook error message is misleading.

    When retrieving an ad account (in order to then display its campaigns or whatever you want within it), you need to retrieve by its ID prepended with 'act_'.

    E.g you could request /act_123456789000001234/campaigns instead of /123456789000001234/campaigns.

    Thanks so much to @Jan Sommer at https://stackoverflow.com/a/39974857/470749.

提交回复
热议问题