Twitter/Fabric 登录按钮只能使用一次 [英] Twitter / Fabric login button only working once
问题描述
我成功地使用了 Fabric 登录按钮 (TWTRLogInButton, https://dev.twitter.com/twitter-kit/ios-reference/twtrloginbutton).
I'm using, with success the Fabric Login button (TWTRLogInButton, https://dev.twitter.com/twitter-kit/ios-reference/twtrloginbutton).
在我的 Swift 应用程序中,我可以验证自己的身份、拨打电话等等.唯一的问题是我实现了一个调用 Twitter.logOut() 的注销"按钮.
In my Swift app I can authenticate myself, make calls and all. The only problem is that i've implemented a "Logout" button that calls Twitter.logOut().
如文档所指定(https://dev.twitter.com/twitter-kit/ios-reference/twitter) 这会删除本地会话,但不会使远程会话无效.结果是,一旦我通过身份验证然后注销,如果我再次单击登录"按钮,我将再次使用同一用户登录,从而有效地防止我切换用户.
As specified by the documentation (https://dev.twitter.com/twitter-kit/ios-reference/twitter) this deletes the local session but does not invalidate the remote session. The effect is that once I'm authenticated and then logged out, if I click the "Login" button again I'm logged-in again with the same user, effectively preventing me from switching user.
有什么帮助吗?
推荐答案
使用方法
[[Twitter sharedInstance] logInWithMethods:TWTRLoginMethodWebBasedForceLogin completion:{}]
参数 TWTRLoginMethodWebBasedForceLogin
Parameter TWTRLoginMethodWebBasedForceLogin
- 呈现不使用任何缓存会话的网络视图来自 Safari.允许开发者提供多用户多个 Twitter 帐户的功能.
这篇关于Twitter/Fabric 登录按钮只能使用一次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!