Plu*_*rge 8 authentication android webview access-token instagram
在Instagram文档之后,我能够对用户进行身份验证并轻松检索access_token
但是现在我想更改Instagram帐户,这是不可能的,因为浏览器会自动调用我的回调URL,因为我已经使用帐户登录(没有再次登录/授权表单)
解释这里发生的是验证/授权流程:
您看到第2步被跳过,因此我们无法使用其他用户登录
Instagram是否有强制重新登录的参数?
贾斯汀·鲍威尔(Justin Powell)的答案适用于注销,但我还需要能够在之后登录,这对于 Android 来说非常烦人
但这为我指明了正确的方向:Instagram(像其他网站一样)使用会话变量(因此使用cookie)维护我们的登录
因此,为了避免总是登录,我们只需找到并删除正确的 cookie,以下是在 Android 上执行此操作的方法:
String cookieString = "sessionid=''";
CookieManager.getInstance().setCookie("instagram.com", cookieString);
Run Code Online (Sandbox Code Playgroud)
这样我将 Instagram sessionidcookie 设置为空字符串,这样 Instagram 就不再识别我了
| 归档时间: |
|
| 查看次数: |
2207 次 |
| 最近记录: |