アプリからツイッターに投稿しましょう。
Social Frameworkを使います。
ソーシャルフレームワークを追加してくださいね。
#import "ViewController.h" #import <Social/Social.h> @interface ViewController () - (void)twitter { SLComposeViewController *twVC = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter]; [twVC setInitialText:@"つぶやくよ。"];//あらかじめテキスト入力 [twVC addImage:[UIImage imageNamed:@"image.jpg"]];//画像を入れる [twVC addURL:[NSURL URLWithString:@"http://apple.com/"]];//URLを入れる [self presentViewController:twVC animated:YES completion:nil];//投稿ダイアログを表示する }
[self twitter]
で呼び出せば投稿ダイアログが出ます。