는이 책에서 몇 가지 정보를 발견했다. "아이폰 및 아이 패드 앱 개발 사업 : 앱 만들기 및 마케팅". 5 장. 사회적 개념 : 앱으로 앱 홍보. 이 장에서는 Email 및 Facebook에 대해 언급합니다.
SMS의 경우 구현하기가 쉽지만 여기서는 몇 가지 샘플 코드가 있습니다. 이메일
MFMessageComposeViewController *smsController = [[MFMessageComposeViewController alloc] init];
smsController.messageComposeDelegate = self;
smsController.body = @"check out apps, link";
[self presentModalViewController:smsController animated:YES];
[smsController release];
sampel 코드 : 페이스 북의 경우
MFMailComposeViewController *mcvc = [[MFMailComposeViewController alloc] init];
mcvc.mailComposeDelegate = self;
[mcvc setSubject:@"Check out this app"];
UIImage *image = [UIImage imageNamed:@"Icon"];
//include your app icon here
[mcvc addAttachmentData:UIImageJPEGRepresentation(image, 1) mimeType:@"image/jpg" fileName:@"icon.jpg"];
// your message and link
NSString *defaultBody [email protected]"check out this cool apps, link...."
[mcvc setMessageBody:defaultBody isHTML:YES];
[self presentViewController:mcvc animated:YES completion:nil];
, 그것은 조금 복잡합니다. 당신은 페이스 북 SDK를 사용하고 그들의 문서를 참조해야합니다. http://developers.facebook.com/ios/
NSMutableDictionary *dict = [NSMutableDictionary dictionary];
[dict setObject:@"This is a great apps, link..." forKey:@"message"];
[facebook requestWithGraphPath:@"me" andParams:dict andHttpMethod:@"POST" andDelegate:self];