I hope somebody can help me.
I've basically spent all day to achieve a programmatic creation of a Facebook ad in PHP.
If wanted I can provide my code of course, but so far it doesn't get me anywhere.
Maybe someone has a working example in PHP on how to programmatically create an ad successfully. I have managed to create a new campaign, I have managed to create a new ad set, I have managed to create an image and to receive the corresponding hash.
But when it comes to the ad creative I am unable to receive an ID that I can pass on to the ad.
When using "OBJECT_STORY_SPEC" the error gives me, that I need to set the enroll_status. This I have not successfully achieved.
When going without OBJECT_STORY_SPEC I simply get an array for the adcreative, which has no id that I can pass on to
AdFields::CREATIVE => array( 'creative_id' => $adCreative->id, ),
Thank you!
I'm using python these parameters worked for me: