instagram - 想问下instagram接口怎么实现
问题描述
https://developers.facebook.com/docs/instagram-api/guides/business-discovery
“https://graph.facebook.com/v3.2/17841405309211844?fields=business_discovery.username(bluebottle){followers_count,media_count,media{comments_count,like_count}}&access_token={access-token}”
这是给出的请求示例,但是,我仍然不知道如何编写这个请求?
我写了这样一个请求并得到了正确的结果
String url = "https://graph.facebook.com/v10.0/"
+iguserid+"?" +
"fields=business_discovery.username(bluebottle)" +
",followers_count,media_count,media" +
"&access_token=" + accent_token;
{"media_count":3,"followers_count":5,"media":{"data":[{"id":"1111111"},{"id":"1111111"},{"id":"1111111"}],"paging":{"cursors":{"before":"ssssssENleDdyb2V2LUNsWUNVWHplOVJWalJ0VlczNHo4ekZAfdEEzdEphRW1KRG5aaWVwRTMwaVJKSmZA4Rjh3eEs1Q21ZARVVFY0VKssss","after":"sssssxacVdndEdHZAWxJRGFHNkZAoNWY4NzVkY2toWUV2c3hEazRQN0k1dlo2Uk11TkRuOVh0WVJzZAHlnektVdl9XSksssss"}}},"id":"1111111","business_discovery":{"id":"1111111"}}
我没有以这种方式得到结果
String url = "https://graph.facebook.com/v10.0/"
+iguserid+"?" +
"fields=business_discovery.username(bluebottle)" +
",followers_count,media_count,media,comments_count,like_count" +
"&access_token=" + accent_token;
{"error":{"code":100,"message":"(#100) Tried accessing nonexisting field (comments_count) on node type (IGUser)","type":"OAuthException","fbtrace_id":"A6MeWCgzqzJSHnj9d7EoY75"}}
解决方案
推荐阅读
- android - 如果函数运行超过指定时间,则中断函数
- python - 如何将http附件转换为文件?
- tensorflow - 使用 tensorflow-gpu 时如何使用 nvdia 显卡而不是 Intel?
- dart - Flutter:如何访问子页面中的 ScopeModel 属性
- javascript - 如何仅通过一个 API 调用查询谷歌地方的多个地址?
- java - 问题:无法将 java.lang.String 类型的对象转换为类型
- r - 识别仅包含 r 中某些字符串的向量元素
- php - PHP - 如何使用 preg_match_all 获取具有特定类名的 img 标签的 src?
- r - 用向量替换 R 子集中矩阵中的值
- facebook - Facebook 应用程序 - 无法在产品下添加“Facebook 登录”产品