0
我正在嘗試創建廣告素材,但獲取無效參數錯誤。該異常甚至沒有指定哪個參數錯誤。廣告創意出現錯誤「無效的參數」Facebook營銷API
try {
$link_data = new AdCreativeLinkData();
$link_data->setData(array(
AdCreativeLinkDataFields::MESSAGE => 'try it out',
AdCreativeLinkDataFields::LINK => 'http://www.google.com',
AdCreativeLinkDataFields::IMAGE_HASH => '704e55dbf724243acfb8457a4f68a92a',
));
$object_story_spec = new AdCreativeObjectStorySpec();
$object_story_spec->setData(array(
AdCreativeObjectStorySpecFields::LINK_DATA => $link_data,
));
$creative = new AdCreative(null, 'act_576834712392068');
$creative->setData(array(
AdCreativeFields::NAME => 'Sample Creative Suite CRM',
AdCreativeFields::OBJECT_STORY_SPEC => $object_story_spec,
));
$creative->create();
}
catch (Exception $e) {
echo 'Caught exception: ', $e, "\n";
}
捕捉到異常:異常 'FacebookAds \ HTTP \異常\ AuthorizationException' 有消息 '無效的參數'