Facebook Graph API return 调用 Business Discovery API 时出错

Facebook Graph API return error when call Business Discovery API

当我调用 api 时:

 graph.facebook.com/userid?fields=business_discovery.username(name){followers_count,media_count}

在 Graph API explore 中,我得到了一个无效的参数错误:

(#100) Tried accessing nonexisting field (business_discovery) on node type (User)

任何人都可以向我解释一下我在 API url 中错过了什么吗?

谢谢

这仅适用于 Instagram 企业帐户,但您似乎使用的是普通用户 ID。

正如https://developers.facebook.com/docs/instagram-api/reference/user/business_discovery所说,

Instagram Platform API account IDs will not work with the new Instagram Graph API. Please use the Page node to determine the correct Instagram Business Account ID associated with the Facebook page.

您不能将此用于其他类型的 Instagram 帐户,只能用于企业帐户。

在我的情况下,问题是当访问令牌发出时,instagram 帐户未连接到页面,即我在连接应用程序后添加了 instagram 帐户。

所以对我有用的是删除应用程序,确保 Instagram 帐户连接到连接应用程序的页面。现在访问令牌可以使用了。