gpt4 book ai didi

iphone - 如何在 Twitter Rest API v1.1 中从 FHSTwitterEngine 完全注销?

转载 作者:可可西里 更新时间:2023-11-01 03:06:25 26 4
gpt4 key购买 nike

FHSTwitterEngine *engine = [FHSTwitterEngine sharedEngine];
[engine clearAccessToken];

我尝试了上面的代码,但是当我尝试再次登录时,文本字段没有出现在 presentModalViewController 中,它显示授权应用程序按钮。

还有另一种方法,[engine clearConsumer]; 其结果是 Select and Copy the PIN in presentModalViewController

最佳答案

我相信 cookie 仍然存在,这是 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];
}

希望对您有所帮助。

问候,

雷诺琼斯

关于iphone - 如何在 Twitter Rest API v1.1 中从 FHSTwitterEngine 完全注销?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17499999/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com