本來我是想通過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.
- 1 回答
- 0 關注
- 221 瀏覽
添加回答
舉報
0/150
提交
取消