如果用户尝试在OAuth窗口中登录,则Instagram API(经典,而非图形)会丢失重定向URL中的自定义参数.
由于丢失重定向URI中的自定义参数,Instagram获取访问令牌返回"重定向URI不匹配错误"
来自Instagram的回复:
{'error_code'=>90001, 'error_message'=>'POST https://api.instagram.com/oauth/access_token/: 400: OAuthException: Redirect URI doesn't match original redirect URI'}
Run Code Online (Sandbox Code Playgroud)
如果用户在执行OAuth之前登录Instagram,一切正常.