android - 如何退出推特

标签 android oauth twitter

我已经成功创建了一个应用程序来登录用户并使用 OAuth 支持发布推文 但我想不出注销用户或强制登录的方法(使用推特 登录)。非常感谢任何帮助。

提前致谢

最佳答案

我相信这个question有适合您的答案。为方便起见,我将在此处发布摘要。

来自 Ryan McGeary :

The session with Twitter is defined by a cookie owned by Twitter -- something you do not have control over. You cannot log them out of Twitter on their behalf.

If you want someone to be able to use your "switch twitter account" functionality, you'll need to pass them off to the OAuth handshake again, but use the /oauth/authorize path instead of the /oauth/authenticate path. This will allow the user to switch their user credentials at Twitter during the handshake instead of just re-authenticating using their existing Twitter session.

来自 abraham :

You can use oauth/authenticate and add force_login=true as specified in http://dev.twitter.com/doc/get/oauth/authenticate*. This will prompt the user with a login form.

**对最新文档的更新引用*

如果以上任何答案对您有用,请务必点击链接并为原件投票。

关于android - 如何退出推特,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6342113/

相关文章:

Android float Activity 与滑动关闭

ruby-on-rails - 如何通过OAuth身份验证传递参数,以便回调或 Controller 可以使用?

java - 在 Grails/Java 上使用 Yahoo Fire Eagle

swift - 没有 http 或 https 的 iOS 应用程序的 LinkedIn OAuth2.0 重定向 url

php 代码适用于 mamp 但不适用于 ubuntu 服务器

android studio 3.0 设备资源管理器 - 运行为 : could not set capabilities: Operation not permitted

android edittext 不滚动

android - 在 Android 中制作一个弹跳的 ListView

api - Twitter Account Activity API - 如何为事件订阅 webhook?

python - Django 用户发帖到推特