“无效的平台应用"使用Instagram基本显示API时出错 [英] "Invalid platform app" error using Instagram Basic Display API

查看:223
本文介绍了“无效的平台应用"使用Instagram基本显示API时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Instagram基本显示API,但是当我发布授权代码以获取访问令牌时,我不断收到以下错误 {"error_type":"OAuthException","code":400,"error_message":"Invalid platform app"}

I am trying to use Instagram Basic display API but when I post the authorization code to get the access token I keep getting the following error {"error_type": "OAuthException", "code": 400, "error_message": "Invalid platform app"}

我正在执行此处提到的所有步骤-> https: //developers.facebook.com/docs/instagram-basic-display-api/getting-started ,是的,我正在使用Instagram应用ID,这是产品-> Instagram->显示并关注以下内容的客户机密是我发送请求的网址

I am following all the steps mentioned here -> https://developers.facebook.com/docs/instagram-basic-display-api/getting-started and Yes I am using the Instagram app ID and It's client secret which is in Products -> Instagram -> Display and following is the URL I am sending the request

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

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

推荐答案

交换代码时,您需要使用POST请求.

When you exchange the code you need to use a POST request.

从url的外观来看,您已将其形成为GET请求,并且所有参数都作为url的一部分而不是表单数据.尝试将参数作为帖子正文的一部分发送

From the looks of your url, you've formed it as a GET request with all the parameters as part of the url rather than as form data. Try sending the parameters as part of the post body instead

这篇关于“无效的平台应用"使用Instagram基本显示API时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆