gpt4 book ai didi

iphone - Twitter:身份验证已更改?应用程序突然在身份验证窗口(钛)上崩溃

转载 作者:行者123 更新时间:2023-12-03 16:56:19 25 4
gpt4 key购买 nike

我在应用程序上的推特部分突然不再起作用。当我想验证应用程序崩溃时。我快速浏览了要登录的弹出窗口(具有新布局),它崩溃并显示以下错误:

http://www.pastie.org/1846358



昨天工作正常,所以我猜auth窗口的新布局有问题吗?我无法在输出中真正找到问题所在,此外,它还提供了有关html的错误。

谁能帮我吗?还是有人遇到同样的问题,并确认我不是唯一的一个吗?

我正在使用Titanium SDK 1.6.2和iPhone SDK 4.2。

谢谢!

最佳答案

如果使用MGTwitterEngine,请转到SA_OAuthTwitterController.m。并更改此:

- (void) webViewDidFinishLoad: (UIWebView *) webView {
NSError *error;
NSString *path = [[NSBundle mainBundle] pathForResource: @"jQueryInject" ofType: @"txt"];
NSString *dataSource = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:&error];

if (dataSource == nil) {
//YFLog(@"An error occured while processing the jQueryInject file");
}

//DLog(@"%@", [_webView stringByEvaluatingJavaScriptFromString:@"document.getElementsByTagName('body')[0].innerHTML"]);
[_webView stringByEvaluatingJavaScriptFromString:dataSource]; //This line injects the jQuery to make it look better
//check for auth_pin element
NSString *authPin = [[_webView stringByEvaluatingJavaScriptFromString: @"document.getElementById('oauth_pin').innerHTML"] stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]];
authPin = [[_webView stringByEvaluatingJavaScriptFromString: @"document.getElementById('oauth_pin').getElementsByTagName('kbd')[0].getElementsByTagName('code')[0].innerHTML"] stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]];
if (authPin.length == 0)
authPin = [[_webView stringByEvaluatingJavaScriptFromString: @"document.getElementById('oauth_pin').getElementsByTagName('a')[0].innerHTML"] stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]];
//if the auth pin not found than check for the auth-pin elenent
if (authPin == nil || authPin.length == 0) {
authPin = [[_webView stringByEvaluatingJavaScriptFromString: @"document.getElementById('oauth-pin').innerHTML"] stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]];
if (authPin.length == 0) {
authPin = [[_webView stringByEvaluatingJavaScriptFromString: @"document.getElementById('oauth-pin').getElementsByTagName('a')[0].innerHTML"] stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]];
}
}
[_activityIndicator stopAnimating];
if (authPin.length) {
[self gotPin: authPin];
}
if ([_webView isLoading] || authPin.length) {
[_webView setHidden:YES];
} else {
[_webView setHidden:NO];
}
}

关于iphone - Twitter:身份验证已更改?应用程序突然在身份验证窗口(钛)上崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5829407/

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