Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (IBAction) post: (id) sender{
- TwitterRequest * t = [[TwitterRequest alloc] init];
- t.err = TRUE;
- t.username = usernames.text;
- t.password = passwords.text;
- [t statuses_update:twittermessage.text delegate:self requestSelector:@selector(status_updateCallback:)];
- loadingActionSheet = [[UIActionSheet alloc] initWithTitle:@"Posting to Twitter..." delegate:nil
- cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil];
- [loadingActionSheet showInView:self.view];
- if (t.callback == ???) {
- [loadingActionSheet dismissWithClickedButtonIndex:0 animated:YES];
- [loadingActionSheet release];
- UIAlertView *alert;
- alert = [[UIAlertView alloc] initWithTitle:@"Ouch!"
- message:@"Your Username or Password is wrong!"
- delegate:self
- cancelButtonTitle:@"OK"
- otherButtonTitles: nil];
- [alert show];
- [alert release];
- }
- }
- - (void) status_updateCallback: (NSData *) content {
- [loadingActionSheet dismissWithClickedButtonIndex:0 animated:YES];
- [loadingActionSheet release];
- NSLog(@"%@",[[NSString alloc] initWithData:content encoding:NSASCIIStringEncoding]);
Add Comment
Please, Sign In to add comment