【发布时间】:2014-05-27 10:19:16
【问题描述】:
我正在开发一个与 Instagram API 集成以访问用户信息的应用程序。我使用授权 url 成功获取了访问令牌,但无法使用 access_token url 获取 userId:
我尝试了两个端点:
https://api.instagram.com/oauth/access_token?client_id=48275564e2c445f6b8e1356djfha3e0c&client_secret=ab2062da9f314e3489dke7ae9cbe6e5d&redirect_uri=http://localhost&grant_type=authorization_code
https://api.instagram.com/oauth/access_token
帖子正文为:
client_id=48275564e2c445f6b8e1356djfha3e0c&client_secret=ab2062da9f314e3489dke7ae9cbe6e5d&redirect_uri=http://localhost&grant_type=authorization_code&code=1351860224.4827556.5dc92c4d15ea4a4ea1b0d33eaf0eef19
(请求中的数据已修改),但我得到了以下内容
{
"code": 400,
"error_type": "OAuthException",
"error_message": "No matching code found."
}
我已经看到了大量的疑问和问题,但找不到任何解决问题的方法。
我有几个问题是:
1) is the field code in the URL is same as access_token, if not how could i get the code field's value.
2) is there any other mechanism(API) to fetch the user details given the username is not known.
请帮助我,因为我完全被卡住了,而且我的最后期限已经用完了。
【问题讨论】:
-
为什么要投反对票..请提供任何答案或参考1e70363a5a50d9a解决问题,而不是通过投反对票逃跑..
-
您的请求看起来是正确的,尽管我还没有使用 Instagram API。但是,我搜索了您的问题并指出,您不是唯一遇到此问题的人。 (groups.google.com/forum/#!topic/instagram-api-developers/…) 我会尝试喝点茶然后等待,也许他们需要一些后台工作来设置应用程序或尝试创建另一个应用程序。
-
这对于 Instagram 的支持团队来说似乎是一个很好的问题。当第三方 API 出现故障时,SO 并不是真正获得支持的地方。
-
@AmritpalSingh 你的问题已经解决了吗?
-
请找到我对类似问题的回答here。