无法使用新的基本Instagram API获得Instagram访问令牌 [英] Unable to get Instagram access token with new basic Instagram API

查看:188
本文介绍了无法使用新的基本Instagram API获得Instagram访问令牌的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对新的Instagram API感到非常沮丧,我需要做的只是从我的Instagram提要中获取图片,评论和喜欢的东西.我正在遵循他们在这里提到的所有步骤 https://developers.facebook.com/docs/instagram-basic-display-api/guides/getting-access-tokens-and-permissions ,但我仍然无法获取与API交互所需的最终访问令牌.在遇到很多不同的错误之后,我陷入了困境:

I'm getting really frustrated with the new Instagram API, what I need to do is just get things like pictures, comments, and likes from my Instagram feed. I'm following all the steps that they mention over here https://developers.facebook.com/docs/instagram-basic-display-api/guides/getting-access-tokens-and-permissions, but I'm still not able to get the final access token I need in order to interact with the API. After getting a lot of different errors now I'm stuck with:

{"error_type":"OAuthException","code":400,"error_message":验证验证码时出错.请确保您的redirect_uri与在OAuth对话框请求中使用的相同."}

我已经验证了我的Facebook开发人员设置中的所有内容,并且一切正常,OAuth URL与我在curl命令中使用的URL相同,以便返回access_token,所有设置似乎都很好.我注意到很多人都遇到同样的问题,但是我找不到适合我的东西.

I have verified everything in my Facebook developer setup and everything is ok, the OAuth URL is identical to the one I'm using in the curl command in order to return the access_token and all the setups seem fine. I have noticed that a lot of people are having the same problems but I can't find something that works for me.

这是我尝试检索access_token的方式:

This is the way I'm trying to retrieve the access_token:

curl -X POST https://api.instagram.com/oauth/access_token -F client_id=[client_id] -F client_secret=[code] -F grant_type=authorization_code -F redirect_uri=[url] -F code=AQDJxpW5h4r..

我已经读到人们正在使用邮递员,显然它可以在那儿工作,但是我不知道如何使用它,任何帮助将不胜感激.

I have read that people are using postman and apparently it works over there but I don't know how to use it, any help will be really appreciated.

对此进行升级,我终于能够通过邮递员获得access_token,当我现在尝试使用它时,出现了此错误:

Upgrade on this, I was finally able to get the access_token via Postman and when I'm trying to use it now I got this error:

{"meta": {"code": 400, "error_type": "OAuthAccessTokenException", "error_message": "The access_token provided is invalid."}}

这真令人失望,在更改此API之前,一切工作都很好.有什么想法吗?

This is really disappointing, everything was working just fine before this API change. Any ideas?

推荐答案

只需再次检查清单中的以下内容:

Just review of the following in your checklist again:

  1. "Instagram APP"的APP_ID和APP_SECRET,这是在Facebook App中添加的产品.
  2. 一旦使用CURL或Postman在POST请求中提交了访问代码,该密码将对下一个请求无效.
  3. 网站平台已添加到"Facebook应用"中.
  4. 已添加测试Instagram用户,并且这些用户没有待处理.
  5. 最后,使用Instagram测试用户个人资料进行身份验证.

这篇关于无法使用新的基本Instagram API获得Instagram访问令牌的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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