2

After many tries, I'm not getting how we can use the Facebook API to create a simple Ad based on a Post (and it's creative) like it is possible in the Business Manager.

For example, my last attempt failed due to a problem with Instagram:

Facebook API: Instagram Account Is Missing

If there is anybody that has been able to create a basic Ad (within a given or new AdSet) based on a Post, please help me. I've seen many questons like this (especially regarding the Instagram problem) and now I'd like to have a working solution.

What exact requests have to be done or isn't it possible at all?

Matteo
  • 37,680
  • 11
  • 100
  • 115
K. D.
  • 4,041
  • 9
  • 48
  • 72

1 Answers1

3

THe Instagram placement is added by default in the targeting, so if you want to skip it you need to specify in the targeting field when creating the adSet in the publisher field:

{
"geo_locations":{"countries":["US"]},
publisher_platforms: ['facebook'],
facebook_positions: ['feed', 'right_hand_column'],
device_platforms: ['mobile', 'desktop']
}

If you want to publish on Instagram also you should also provide an instagram actor ID: The AdsCreative should contain an extra field named instagram_actor_id also remember to add Instagram in the related targeting:

{
"geo_locations":{"countries":["US"]},
publisher_platforms: ['facebook','instagram'],
facebook_positions: ['feed', 'right_hand_column'],
instagram_positions: ['stream', 'story'],
device_platforms: ['mobile', 'desktop']
}

Reference:

https://developers.facebook.com/docs/marketing-api/guides/instagramads https://developers.facebook.com/docs/marketing-api/guides/instagramads/ads_management/

https://developers.facebook.com/docs/marketing-api/targeting-specs/#placement

Let me know if you need more info or an answer or your other question about Instragam

Matteo
  • 37,680
  • 11
  • 100
  • 115
  • 2
    Thank you. My missing part was to specify the `instagram_actor_id` when creating the `AdCreative`. – K. D. Dec 10 '18 at 14:22