首页 > 解决方案 > instagram_graph_user_media 和 instagram_graph_user_profile 权限仅适用于测试用户

问题描述

我有一个显示用户 instagram 媒体的应用程序(如一些约会应用程序)。

此外,我的应用程序已成功通过权限审核 - instagram_graph_user_profileinstagram_graph_user_media处于实时模式

但是在 Facebook 开发者控制台中,instagram 图标没有变成绿色。请参考截图。 https://drive.google.com/open?id=1VnMHLqjTf1oRbvcm2g8Ol80AfB3JqMOg

显示媒体的流程如下。

1.我的应用要求用户授权使用

https://api.instagram.com/oauth/authorize?client_id=instagram-app-id&redirect_uri=redirect_uri&scope=scope&response_type=code&state=state

2.上面的api用代码响应。然后后端调用-

https://api.instagram.com/oauth/access_token

带参数 - client_id、client_secret、code、grant_type、redirect_uri

3. 一旦我从上面的 API 接收到令牌,我使用 - 从短期令牌请求长期令牌 -

https://graph.instagram.com/access_token?grant_type=ig_exchange_token&client_secret=xyz&access_token=abc

4. 使用长寿命令牌,服务器使用 API 请求用户信息 -

https://graph.instagram.com/me?fields=id,username&access_token=abc

5. 使用相同的长寿命令牌,服务器使用 API 请求获取用户媒体 -

https://graph.instagram.com/me/media?fields=id,media_type,media_url,username,caption,timestamp&access_token=abc

此流程仅适用于测试用户接受 Instagram 开发者平台测试员邀请的 Instagram 测试用户)。

当非测试用户尝试查看媒体时,在第 3 步,我收到一条错误消息 -

{“错误”:{“消息”:“不支持的获取请求。”,“类型”:“IGApiException”,“代码”:100,“fbtrace_id”:“A0A24rNXCScki9Ck-8J_55b”}}

我错过了什么吗?

这就是我看到我的业务 API 设置的方式。请参考截图。 https://drive.google.com/open?id=1Dfdihf20krEcYEmoh8z43_a1T5UQStXr

在我的应用审核部分下,我没有看到任何需要再次审核的相关权限。

编辑 1 -

注意 - 我的应用程序处于测试模式(尚未在 Play 商店上线)。这可能是原因吗?

标签: instagraminstagram-graph-api

解决方案


我刚刚经历了一个类似的过程,让我的应用程序准备好让旧 API 正式贬值。我终于找到了这个-希望它有所帮助: https ://developers.facebook.com/community/threads/2219648518091109/

“在您的应用程序获得批准后,您可以从业务经理那里获得合同。您需要在计算机上完成(移动设备无法使用)并且必须是业务管理员。

从您的业务经理那里,您只需转到业务信息 -> 业务合同 ( https://business.facebook.com/settings/info )

如果这个答案对您有帮助,请让我们其他人!”

感谢娟子的分享!


推荐阅读