我正在尝试使用 Facebook 的 Graph API 来获取用户的见解数据,并将其显示在他们的管理面板中,作为其自定义 CMS 的一部分。
我的 Facebook 集成有几个步骤:
1. 认证
2. 获取用户的页面、应用程序和域的列表
3.获取每个页面、应用程序和域的见解数据
以上所有内容都有效,但我找不到列出用户拥有的所有域的方法。我正在使用 https://graph.facebook.com/me/accounts 获取列表用户的帐户数。这将返回所有页面和应用程序,但不返回域。
我浏览了 Facebook 的所有文档,但找不到任何有关检索列表的方法的参考。
我尝试过https://graph.facebook.com/domains,https://graph.facebook.com/me/domains,https://graph.facebook.com/domain,以及https://graph.facebook.com/me/domain - 无济于事。 https://graph.facebook.com/domain 和 https://graph.facebook.com/domains 有效,但仅在您知道域名时才有用。
那么问题来了:有没有办法使用 Graph API 获取用户的域列表?
谢谢
I'm trying to use Facebook's Graph API to grab a user's insights data, and display it in an admin panel for them, as a part of their custom CMS.
There are a few steps to my Facebook integration:
1. Authenticate
2. Get a list of pages, applications, and domains for the user
3. Get insights data for each page, application and domain
All of the above are working, but I can't find a way to list all the domains a user has. I'm using https://graph.facebook.com/me/accounts to get the list of accounts for the user. This is returning all the Pages and Applications, but no Domains.
I have looked all over Facebook's docs, and can't find any reference to a method for retrieving a list.
I have tried https://graph.facebook.com/domains, https://graph.facebook.com/me/domains, https://graph.facebook.com/domain, and https://graph.facebook.com/me/domain - to no avail. https://graph.facebook.com/domain and https://graph.facebook.com/domains are valid, but are only useful if you know the domain.
So, the question: Is there a way to obtain a list of domains for a user using the Graph API?
Thanks
发布评论
评论(1)
尝试此图形 API 调用:
https://graph.facebook.com/fql?q=SELECT domain_name, domain_id FROM domain WHERE domain_id in ( SELECT domain_id FROM domain_admin WHEREowner_id=me())&access_token=VALIDUSERACCESSTOKENOFTHEOWNEROFTHEDOMAIN< /代码>
try this Graph API call:
https://graph.facebook.com/fql?q=SELECT domain_name, domain_id FROM domain WHERE domain_id in ( SELECT domain_id FROM domain_admin WHERE owner_id=me())&access_token=VALIDUSERACCESSTOKENOFTHEOWNEROFTHEDOMAIN