- ///////Main Link For this Demo....http://erwinzwart.com/2011/10/18/tutorial-how-to-post-tweets-with-ios5/#more-245
- (IBAction)shareOnTwitter:(id)sender { - TWTweetComposeViewController *twitter = [[TWTweetComposeViewController alloc] init];
- [twitter setInitialText:@"It's really that simple!"];
- [twitter addImage:[UIImage imageNamed:@"twitter.png"]];
- [self presentViewController:twitter animated:YES completion:nil];
- twitter.completionHandler = ^(TWTweetComposeViewControllerResult res) {
- if(res == TWTweetComposeViewControllerResultDone)
- {
- UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:@"Succes!" message:@"Your Tweet was posted succesfully" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
- [alertView show];
- }else if(res == TWTweetComposeViewControllerResultCancelled)
- {
- UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Your Tweet was not posted" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
- [alertView show];
- }
- [self dismissModalViewControllerAnimated:YES];
- };
- }
Imagination is more important than knowledge. Knowledge is limited, whereas imagination embraces the entire world stimulating progress, giving birth to evolution.
Monday, 30 January 2012
In Built Twitter use of ios5 in iphone sdk...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment