首页 > 解决方案 > 使用 Instagram 基本显示 API 时出现“无效平台应用”错误

问题描述

我正在尝试使用 Instagram 基本显示 API,但是当我发布授权代码以获取访问令牌时,我不断收到以下错误

{“error_type”:“OAuthException”,“code”:400,“error_message”:“无效的平台应用程序”}

我正在遵循此处提到的所有步骤-> https://developers.facebook.com/docs/instagram-basic-display-api/getting-started是的,我正在使用 Instagram 应用程序 ID,它的客户端密码位于Products -> Instagram -> Display和以下是我发送请求的 URL

"https://api.instagram.com/oauth/access_token?client_id=".$app_id."&client_secret=".$app_secret."&grant_type=authorization_code&redirect_uri=".$redirecturi."&code=".$code,

标签: phpapifacebook-graph-apifacebook-appsinstagram-graph-api

解决方案


我遇到了同样的问题。问题是我使用的是 Facebook App ID 和 App Secret 而不是 Instagram App ID 和 App Secret。您必须前往 Facebook 开发者网站上的“Instagram 基本显示”部分,然后向下滚动,直到找到 Instagram 应用 ID 和密码。


推荐阅读