Skip to content

Instantly share code, notes, and snippets.

@linuxsable
Created August 9, 2010 05:16
Show Gist options
  • Select an option

  • Save linuxsable/514973 to your computer and use it in GitHub Desktop.

Select an option

Save linuxsable/514973 to your computer and use it in GitHub Desktop.
// Check Twitter username & password
- (void)initiateCredentialCheckWithUsername:(NSString *)username password:(NSString *)password {
self.authCID = [self.twitterEngine getXAuthAccessTokenForUsername:username password:password];
self.twitterUsername = username;
}
- (void)requestFailed:(NSString *)requestIdentifier withError:(NSError *)error {
NSLog(@"Request failed");
NSLog(@"%@", requestIdentifier);
NSLog(@"%@", error);
// Failed to login
if (self.authCID == requestIdentifier) {
UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"Login Failure." message:@"You have failed to login" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:nil] autorelease];
[alert show];
[self.loginViewController.spinner stopAnimating];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment