简体   繁体   English

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

[英]Facebook Ads API try connection error - (Unsupported get request. Object with ID 'act_)

I am trying to do the first connection with the Facebook ADs And I used the Quickstart code example using PHP:我正在尝试与 Facebook 广告建立第一次连接,并且我使用了使用 PHP 的快速入门代码示例:

在此处输入图片说明

Then I create the following code:然后我创建以下代码:

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);
}

But I am always getting this error:但我总是收到此错误:

Unsupported get request.不支持的获取请求。 Object with ID 'act_xxxxxxxxxxxxx' does not exist, cannot be loaded due to missing permissions, or does not support this operation. ID 为“act_xxxxxxxxxxxxx”的对象不存在,由于缺少权限而无法加载,或不支持此操作。 Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api请阅读https://developers.facebook.com/docs/graph-api 上的 Graph API 文档

I could see this into the settings I have this information:我可以在我拥有以下信息的设置中看到这一点:

在此处输入图片说明

Just to help if someone has the same problem:只是为了帮助如果有人有同样的问题:

I solved it.我解决了。

The solution is simple, to get the correct Ad Account ID Visit the following link.解决方案很简单,获取正确的广告帐户 ID 访问以下链接。 with your valid access token.使用您的有效访问令牌。 https://graph.facebook.com/v5.0/me/adaccounts?access_token= https://graph.facebook.com/v5.0/me/adaccounts?access_token=

Hope it was helpful.希望它有帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 错误:不支持的获取请求。 请阅读Graph API文档 - ERROR: Unsupported get request. Please read the Graph API documentation 不支持的获取请求-带有Facebook-PHP-Ads-SDK的Facebook Ads API - Unsupported get request - Facebook Ads API with Facebook-PHP-Ads-SDK 使用应用程序令牌时,Facebook页面上的Facebook API“不支持的获取请求。” - Facebook API “Unsupported get request.” on facebook page when using App token Facebook SDK 5 php:“图形返回错误:不支持的帖子请求。” - Facebook SDK 5 php: “Graph returned an error: Unsupported post request.” FacebookAuthorizationException”,并显示消息不支持的获取请求-Facebook PHP API - FacebookAuthorizationException' with message Unsupported get request - Facebook PHP API Facebook API - 不支持获取页面/帖子洞察的请求 - Facebook API - Unsupported get request for page/post insights 当我尝试获取使用帖子用户访问令牌由我的应用创建的帖子数据时,Facebook graph API返回“不支持的获取请求” - Facebook graph api returns “Unsupported get request” when I try to get a post data created by my app using the post user access token Facebook Ads API-需要家长ID - Facebook Ads API - Parent ID Required “不支持的删除请求。” 通过Facebook PHP SDK 4删除照片标签 - 'Unsupported delete request.' removing photo tags via Facebook PHP SDK 4 Facebook ads API:ID为'*****************'的对象不存在,由于缺少权限而无法加载 - Facebook ads API : Object with ID '*****************' does not exist, cannot be loaded due to missing permissions
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM