【发布时间】:2020-07-21 16:59:02
【问题描述】:
我正在尝试使用 Instagram 基本显示 API,但是当我发布授权代码以获取访问令牌时,我不断收到以下错误。谁能帮我解决这个问题?
错误:
{"error_type": "OAuthException", "code": 400, "error_message": "Invalid platform app"}
代码:
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}")
}
})
【问题讨论】:
-
你是怎么得到代码的?
标签: android kotlin instagram instagram-api