views:

6

answers:

1

How do I properly setup the callback method for a status update using the Twitter+OAuth API? (http://github.com/bengottlieb/Twitter-OAuth-iPhone)

Right now I'm using the following to determine if a request succeeded:

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

}

What would I use to determine if a request failed?

A: 

Reading docs helps, implemented the following to solve my problem:

- (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];
}
Steve Bowling