Some of the aliases you requested do not exist create Audiences
Digital Marketing
Facebook Marketing API
2 years ago
5
Star Rating
1
Rating
_x000D_
_x000D_
Earlier I had Facebook personal ad account and with the help of https://developers.facebook.com/docs/marketing-api/reference/custom-audience I used to create custom audience. Now I have shifted to business account and trying to call same create custom audience code and it is giving me following error.
Uncaught exception 'FacebookAds\Http\Exception\AuthorizationException' with message '(#803) Some of the aliases you requested do not exist: createAudiences
Do I need to change marketing API to Business Mapping API or there is some error in current Code?
I am using following code
$audience = new CustomAudience(null, $accountId);
$audience->setData(array(
CustomAudienceFields::NAME => $associative_arr['name'],
CustomAudienceFields::PIXEL_ID => $associative_arr['pixelId'],
CustomAudienceFields::DESCRIPTION => $associative_arr['description'],
CustomAudienceFields::RETENTION_DAYS => $associative_arr['retensionDays'],
CustomAudienceFields::SUBTYPE => CustomAudienceSubtypes::WEBSITE,
CustomAudienceFields::RULE => array('url' => array('i_contains' => $associative_arr['websiteUrl'])),
CustomAudienceFields::PREFILL => $associative_arr['prefill']
));
// Create the audience
$audience->create();
Any suggestions?
Posted on 16 Aug 2022, this text provides information on Facebook Marketing API related to Digital Marketing. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Take Quiz To Earn Credits!
Turn Your Knowledge into Earnings.