Twitter / Fabric登录按钮只能工作一次 [英] Twitter / Fabric login button only working once

查看:181
本文介绍了Twitter / Fabric登录按钮只能工作一次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Fabric Login按钮(TWTRLogInButton, https://dev.twitter) .com / twitter-kit / ios-reference / twtrloginbutton )。



在我的Swift应用中,我可以验证自己,打电话等等。唯一的问题是我已经实现了一个调用Twitter.logOut()的Logout按钮。



正如文档所指定的那样(https://dev.twitter.com/twitter-kit/ios-reference/twitter )删除本地会话但是不会使远程会话无效。结果是,一旦我通过身份验证然后注销,如果再次单击登录按钮,我将再次使用同一用户登录,从而有效地阻止我切换用户。 / p>

任何帮助?

解决方案

使用方法

  [[Twitter sharedInstance] logInWithMethods:TWTRLoginMethodWebBasedForceLogin completion:{}] 

参数TWTRLoginMethodWebBasedForceLogin




  • 显示不使用任何缓存会话的Web视图
    来自Safari。允许开发人员使用多个Twitter帐户提供多用户
    功能。


I'm using, with success the Fabric Login button (TWTRLogInButton, https://dev.twitter.com/twitter-kit/ios-reference/twtrloginbutton).

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().

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.

Any help?

解决方案

use method

[[Twitter sharedInstance] logInWithMethods:TWTRLoginMethodWebBasedForceLogin completion:{}]

Parameter TWTRLoginMethodWebBasedForceLogin

  • Presents a web view that doesn't use any cached sessions from Safari. Allows the developer to provide multi-user functionality with several Twitter accounts.

这篇关于Twitter / Fabric登录按钮只能工作一次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆