我如何正确设置使用Twitter的OAuth的+ API的状态更新回调方法? (http://github.com/bengottlieb/Twitter-OAuth-iPhone)

现在,我使用以下来确定是否请求成功:

- (void)requestSucceeded:(NSString *)connectionIdentifier {
NSLog(@"Statuses Sent");
//[loadingActionSheet dismissWithClickedButtonIndex:0 animated:YES];
//[loadingActionSheet release];

}

我会用它来确定是否请求失败?

有帮助吗?

解决方案

阅读文档帮助,实施了以下解决我的问题:

- (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];
}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top