2

我正在使用 Graph API 从业务用户那里获取详细信息。由于大部分 Profile 都是 Non-Business,想了解一下,是否有 API 来获取 Profile Type?

在试用期间,我不断收到以下消息,并且有时发现 API 行为不端。

{
    "error": {
        "message": "Invalid user id",
        "type": "OAuthException",
        "code": 110,
        "error_subcode": 2207013,
        "is_transient": false,
        "error_user_title": "Cannot find User",
        "error_user_msg": "The user with username: rohit_xxx cannot be found.",
        "fbtrace_id": "FkKgUvBdJWZ"
    }
}

所以,如果我提前知道 Profile Type,我们可以更好地处理响应..

提前致谢..

4

1 回答 1

2

instagram Graph API 旨在与创建者/企业帐户一起使用。这是在多个地方指定的。

如果用户没有企业/创作者帐户,则响应中的 instagram id 将为空。

curl -i -X GET \
 "https://graph.facebook.com/v3.2/{fb-page-id}?fields=instagram_business_account&access_token={access-token}"

回复:

{   
  "instagram_business_account": {
      "id": ""  // Connected IG User ID   
},   
  "id": "134895793791914"  // Facebook Page ID 
}
于 2019-06-21T05:06:51.770 回答