Facebook AdSet错误广告系列与帐户不匹配

时间:2018-03-26 14:06:42

标签: php facebook

我尝试创建AdSet:

if ($adSetCreate) {
        $customOption[AdSetFields::START_TIME] = ($ads->getNoPeriod())
            ? (new \DateTime("now"))->format(\DateTime::ISO8601)
            : ($ads->getCampaignFrom())->format(\DateTime::ISO8601);
    }


    $adSet->setData(array_merge($customOption,[
        AdSetFields::NAME => $this->prefixName . $ads->getProduct()->getName(),
        AdSetFields::CAMPAIGN_ID => $campaign->getData()['id'],
        AdSetFields::TARGETING => $targeting,
        AdSetFields::OPTIMIZATION_GOAL => AdSetOptimizationGoalValues::LINK_CLICKS,
        AdSetFields::BILLING_EVENT => AdSetBillingEventValues::LINK_CLICKS,
        AdSetFields::IS_AUTOBID => true,
        AdSetFields::TARGETING => $targeting,
        AdSetFields::END_TIME => $dateEnd
    ]));

    if ($adSetCreate) {
        $adSet->create($this->setStatus($ads));
    } else {
        $adSet->update($this->setStatus($ads));

我在另一个类中捕获异常n try-catch块:

} catch (\FacebookAds\Http\Exception\AuthorizationException $exception) {
    $output->writeln($exception->getResponse()->getBody());
    $output->writeln($exception->getPrevious());
    exit;
} 

收到消息:

{"error":{"message":"Invalid parameter","type":"OAuthException","code":100,"error_subcode":1487597,"is_transient":false,"error_user_title":"Campaign Doesn't Match Account","error_user_msg":"This campaign belongs to a different account.","fbtrace_id":"BrgPodxyKvd"}}

什么是错的?

0 个答案:

没有答案