如何使用Twitter + OAuth API正确设置状态更新的回调方法? (http://github.com/bengottlieb/Twitter-OAuth-iPhone)
现在我正在使用以下内容来确定请求是否成功:
- (void)requestSucceeded:(NSString *)connectionIdentifier {
NSLog(@"Statuses Sent");
//[loadingActionSheet dismissWithClickedButtonIndex:0 animated:YES];
//[loadingActionSheet release];
}
我将使用什么来确定请求是否失败?
答案 0 :(得分:0)
阅读文档有帮助,实现以下内容来解决我的问题:
- (void) requestFailed:(NSString *)connectionIdentifier withError: (NSError *) error; {
NSLog(@"Status Update Failed");
NSLog(@"Error: %@", error);
[loadingActionSheet dismissWithClickedButtonIndex:0 animated:YES];
[loadingActionSheet release];
alert = [[UIAlertView alloc]
initWithTitle:@"Error" message:@"Twitter did not receive your update, please try again later." delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
}