gpt4 book ai didi

iphone - TWRequest 中的 EXC_BAD_REQUEST 问题

转载 作者:行者123 更新时间:2023-11-28 19:21:06 26 4
gpt4 key购买 nike

我有以下代码,它在执行请求时总是让我崩溃,知道吗?

NSString *responseBody = [[NSString alloc] initWithData:data
encoding:NSUTF8StringEncoding];

NSLog(@"Response body is %@", responseBody);

NSDictionary *accessTokenRequestParams = [[NSMutableDictionary alloc] init];
[accessTokenRequestParams setValue:CONSUMER_KEY forKey:@"x_reverse_auth_target"];
[accessTokenRequestParams setValue:responseBody forKey:@"x_reverse_auth_parameters"];

NSURL *url2 = [NSURL URLWithString:@"https://api.twitter.com/oauth/access_token"];
TWRequest * accessTokenRequest = [[TWRequest alloc] initWithURL:url2 parameters:accessTokenRequestParams requestMethod:TWRequestMethodPOST];


if (selectionIndex != -1)
[accessTokenRequest setAccount:[self.twitterACAccounts objectAtIndex:selectionIndex]];

// execute the request
[accessTokenRequest performRequestWithHandler:
^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
NSString *responseStr =
[[NSString alloc] initWithData:responseData
encoding:NSUTF8StringEncoding];

NSLog(@"The user's info for your server:\n%@", responseStr);
}];

更新:打开 NSZombieEnabled 给我

*** -[ACAccountStore typeForAccount:]: message sent to deallocated instance 0x7199c70

这是无处可寻

最佳答案

您的错误看起来与您的问题完全不同。您在 ACAccountStore 类中有错误。在访问、操作和存储帐户 (ACAccountStore) 时检查您的保留计数。我认为你首先被释放内存并且你正在使用一些地方。

关于iphone - TWRequest 中的 EXC_BAD_REQUEST 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8793588/

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