查找总广告帐户Adspend -Facebook Graph API Explorer
我正在使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论