查找总广告帐户Adspend -Facebook Graph API Explorer

发布于 2025-02-08 16:34:49 字数 946 浏览 1 评论 0原文

我正在使用 Facebook Graph Api Explorer 尝试找到特定广告帐户的ADSpend用户选择了。我正在构建一个仪表板,该仪表板吸引了Facebook广告支出,利用

我遇到的问题是:如何允许用户选择他们想从中获取数据的广告帐户?

我可以通过/me/adaccounts endpoint轻松找到与用户关联的所有广告帐户。返回这样的对象:

"data": [
    {
      "account_id": "16730431364321",
      "id": "act_16730431312239172"
    },
    {
      "account_id": "181543525843374",
      "id": "act_181738765443374"
    },
    {
      "account_id": "393007654523994",
      "id": "act_01923007974523994"
    }
  ],

但是,我不知道用户想要的哪个帐户。当我尝试“页面访问令牌”时,这会促使用户选择他们要授予权限的页面。但是,看来该页面访问令牌旨在管理Facebook页面而不添加帐户。

通过文档阅读,这看起来像我要点击/{ad-account-id}/Insights的端点。它只是提出了一个问题,我如何允许用户选择要从中获取数据的广告帐户?

I am using the Facebook Graph API Explorer to try and find the adspend for a specific ad account the user has selected. I'm building a dashboard that pulls in facebook ad spend leveraging the Marketing insights API.

The issue I'm running into this is: How do I allow for the user to choose the ad account they would like to pull data from?

I can easily find all the ad accounts associated to a user via the /me/adaccounts endpoint. That returns an object like so:

"data": [
    {
      "account_id": "16730431364321",
      "id": "act_16730431312239172"
    },
    {
      "account_id": "181543525843374",
      "id": "act_181738765443374"
    },
    {
      "account_id": "393007654523994",
      "id": "act_01923007974523994"
    }
  ],

However, I don't know which of these accounts the user wants. When I tried the "Page Access Token", that prompted the user to select the page they want to give permissions to. However, it appears the Page Access Token is intended for managing Facebook pages and not add accounts.

Reading through the Docs, this looks like the endpoint I want to hit /{ad-account-id}/insights. It just begs the question, how do I allow the user to select the ad account the want to pull data from?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文