I'm using Facebook Marketing Api and I can not retrieve AdCreative
object's object_story_spec
field as described in docs here: https://developers.facebook.com/docs/marketing-api/reference/ad-creative
Though object_story_spec
field itself seems to be a perfectly OK:
$creative = new AdCreative($ad->creative['id']);
$creativeData = $creative
->read(['object_story_spec', 'object_story_id'])
->getData();
// $creativeData['object_story_id'] contains an ID like 99999999999_99999999999,
// $creativeData['object_story_spec'] is null
I tried to run query with curl, same result:
curl -G \
-d 'fields=object_story_spec' \
-d 'fields=object_story_id' \
-d 'access_token=MYTOKEN' \
https://graph.facebook.com/v2.6/123456789
The result does not contain object_story_spec
at all:
{"object_story_id":"99999999999_99999999999","id":"123456789"}
A few more things:
- The token is authorized to perform actions.
- The ad is active.
object_story_spec
is definitely a correct field since querying a non-existent field results in error
Best regards, Alexander
P.S. I submitted a bug report to FB: https://developers.facebook.com/bugs/1721287254755608/