为了账号安全,请及时绑定邮箱和手机立即绑定

请问我的这一块授权还有什么其他的解决方法吗?谢谢!

请问我的这一块授权还有什么其他的解决方法吗?谢谢!

森林海 2023-04-15 22:18:16
本来我是想通过Web授权,然后回调应用的专有地址,比如在instagram dev设置中设置回调地址为 myapp://xxxx 这样,它授权完成后会把token接在转发连接上,并且会发送到我的应用程序中,但是现在发现instagram的回调地址只能是http开头的。这样我在没有自己的服务端的情况下,就无非获取instagram的回调了。
查看完整描述

1 回答

?
GCT1015

TA贡献1827条经验 获得超4个赞

第一步:用webview打开

https://api.instagram.com/oauth/authorize/?client_id=CLIENT-ID&redirect_uri=REDIRECT-URI&response_type=code

委托里判断每次载入URL,如果URL以REDIRECT-URL开头,则验证完成(第二步),不知道你是不是卡在了这里

http://your-redirect-uri?code=CODE

拿到CODE,POST给insta(第三步)post参数如下

client_id: your client id
client_secret: your client secret
grant_type: authorization_code is currently the only supported valueredirect_uri: the redirect_uri you used in the authorization request. Note: this has to be the same value as in the authorization request.
code: the exact code you received during the authorization step.


查看完整回答
反对 回复 2023-04-18
  • 1 回答
  • 0 关注
  • 121 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信