我正在尝试使用 Instagram Basic 显示 API,但是当我发布授权代码以获取访问令牌时,我不断收到以下错误。有人能帮我解决这个问题吗?
Error:
{"error_type": "OAuthException", "code": 400, "error_message": "Invalid platform app"}
Code:
val url="https://api.instagram.com/oauth/access_token/" +
"?client_id=${InstagramId}" +
"&client_secret=${InstagramSecret}" +
"&grant_type=authorization_code " +
"&redirect_uri=${RedirectUrl}" +
"&code=${code}"
AndroidNetworking.post(url)
.build()
.getAsJSONObject(object : JSONObjectRequestListener {
override fun onResponse(response: JSONObject) {
Log.d("_TAG_", "onResponse:217 $response")
}
override fun onError(error: ANError) {
error.printStackTrace()
Log.d("_TAG_", "onError:226 ${error.errorBody} - ${error.errorCode} - ${error.errorDetail} - ${error.response}")
}
})
我遇到了类似的问题,我使用的是 facebook 应用程序 id 和应用程序密钥,而不是 instagram 应用程序 id 和应用程序密钥。要获取 Instagram 应用程序 ID 和密码,请访问 Facebook 开发者网站上的“Instagram 基本显示”部分。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)