FHSTwitterEngine *engine = [FHSTwitterEngine sharedEngine];
[engine clearAccessToken];
我尝试了上面的代码,但是当我尝试再次登录时,文本字段不会出现在presentModalViewController
,它显示授权应用程序按钮。
还有一个方法,[engine clearConsumer];
结果Select and Copy the PIN
in presentModalViewController
我相信 cookies 仍然存在,这是 iOS 上大多数 Twitter API 的主要问题。
这是您检查所有 cookie 的方法,在两者之间进行检查以仅清除您在 twitter 上执行注销操作的 twitter cookie:
NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
for (NSHTTPCookie *each in cookieStorage.cookies) {
// put a check here to clear cookie url which starts with twitter and then delete it
[cookieStorage deleteCookie:each];
}
希望能帮助到你。
Regards,
雷诺·琼斯
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)