te')); return $arr; } /* 遍历用户所有主题 * @param $uid 用户ID * @param int $page 页数 * @param int $pagesize 每页记录条数 * @param bool $desc 排序方式 TRUE降序 FALSE升序 * @param string $key 返回的数组用那一列的值作为 key * @param array $col 查询哪些列 */ function thread_tid_find_by_uid($uid, $page = 1, $pagesize = 1000, $desc = TRUE, $key = 'tid', $col = array()) { if (empty($uid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('uid' => $uid), array('tid' => $orderby), $page, $pagesize, $key, $col); return $arr; } // 遍历栏目下tid 支持数组 $fid = array(1,2,3) function thread_tid_find_by_fid($fid, $page = 1, $pagesize = 1000, $desc = TRUE) { if (empty($fid)) return array(); $orderby = TRUE == $desc ? -1 : 1; $arr = thread_tid__find($cond = array('fid' => $fid), array('tid' => $orderby), $page, $pagesize, 'tid', array('tid', 'verify_date')); return $arr; } function thread_tid_delete($tid) { if (empty($tid)) return FALSE; $r = thread_tid__delete(array('tid' => $tid)); return $r; } function thread_tid_count() { $n = thread_tid__count(); return $n; } // 统计用户主题数 大数量下严谨使用非主键统计 function thread_uid_count($uid) { $n = thread_tid__count(array('uid' => $uid)); return $n; } // 统计栏目主题数 大数量下严谨使用非主键统计 function thread_fid_count($fid) { $n = thread_tid__count(array('fid' => $fid)); return $n; } ?>facebook - not getting ad_id, campaign_id, adset_id for live leads in <FORM_ID>leads ( Meta Retrieving leadAdsMeta
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

facebook - not getting ad_id, campaign_id, adset_id for live leads in <FORM_ID>leads ( Meta Retrieving leadAdsMeta

programmeradmin3浏览0评论

I'm encountering an issue while retrieving lead data via the Graph API for live leads (not test leads). Despite explicitly requesting fields like ad_id, campaign_id, and adset_id, the API response only includes basic lead fields but omits all ad-related fields.

I am calling retrieve leads graph API for forms, graph_url/version/<Form_ID>/leads?fields=ad_id,field_data,form_id,is_anic,platform,created_time,adset_id,ad_name,adset_name,campaign_id,campaign_name

but it doesn't return ad_id, campaign_id or adset_id etc. it only returns:

{
  "field_data": [
     ...
  ],
  "form_id": "48495496xxxxxx",
  "is_anic": false,
  "platform": "ig",
  "created_time": "2025-02-16T19:50:03+0000",
  "id": "285646074598xxxxx"
}

these leads are not from testing or debug tool, these are live leads i am trying to fetch,

few more things I tried: calling /<leadgen_id> endpoint with same fileds. but that also does not return ad_id, campaign_id or adset_id.

Use of webhooks, webhooks are already integrated and in use and it receive ad_id and form_id, but some leads are never sent via webhook, which is why we are using the API as a fallback.

Access token permissions: These are the permissions granted to access_token,

pages_show_list
ads_management
ads_read
leads_retrieval
pages_read_engagement
pages_manage_metadata
pages_manage_ads

Ad_accounts are seperate from page, user or access_token user does not have permission on ad_accounts only on Page, that's why we are fetching leads from form. and I belive this might be the reason not getting ad_id and campaign, as these are the assets connected to ad_account can someone help what can be workaround in this situation.

If someone has any solution or suggestion, please provide.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论