第一步:用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 value
redirect_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.