Facebook Ads API尝试连接错误-(不支持的获取请求。ID为'act_的对象)

问题描述 投票:0回答:1

[我正在尝试与Facebook广告建立第一次连接,并且我使用了使用PHP的快速入门代码示例:

enter image description here

然后创建以下代码:

public function start(){
    $api = Api::init($this->_app_id, $this->_app_secret, $this->_access_token);
    $api->setLogger(new CurlLogger());

   $fields = array( 'campaign_name','campaign_id' );
    $params = array(
    'level' => 'campaign',
    'filtering' => array(array('field' => 'delivery_info','operator' => 'IN','value' => array('active','scheduled','completed','recently_completed','archived','permanently_deleted')),array('field' => 'objective','operator' => 'IN','value' => array('CANVAS_APP_ENGAGEMENT','MOBILE_APP_ENGAGEMENT')),array('field' => 'updated_time','operator' => 'GREATER_THAN','value' => 1580014800000)),
    'breakdowns' => array('monthly','action_device','ad_id'),
    'time_range' => array('since' => '2019-12-01','until' => '2020-01-01'),
    );
    echo json_encode((new AdAccount($this->_ad_account_id))->getInsights(
    $fields,
    $params
    )->getResponse()->getContent(), JSON_PRETTY_PRINT);
}

但是我总是收到此错误:

不支持的获取请求。 ID为“ act_xxxxxxxxxxxxx”的对象不存在,由于缺少权限而无法加载或不支持此操作。请阅读https://developers.facebook.com/docs/graph-api]中的Graph API文档

我可以在具有此信息的设置中看到它:

enter image description here

我正在尝试与Facebook AD进行第一次连接,并且我使用了使用PHP的快速入门代码示例:然后创建了以下代码:public function start(){$ api = Api :: init($ this-&。 ..

php laravel facebook facebook-php-sdk
1个回答
0
投票

如果有人遇到相同的问题,只提供帮助:

© www.soinside.com 2019 - 2024. All rights reserved.