Reputation: 3678
I am looking to add an invite friend screen to my application. Ideally I would like to to support invitations via email, SMS or Facebook (similar to path).
The invite will only be a message informing the user that the application exists and a link to the App Store to download it.
Is there an open source library which does such thing? Alterntively can anyone reccomend any tutorials which could help?
P
Upvotes: 2
Views: 5433
Reputation: 1717
Bit late, but this might help... https://libraries.io/cocoapods/AppSociallySDK
Upvotes: 2
Reputation: 1386
I found some information in this book. "The Business of iPhone and iPad App Development: Making and Marketing Apps". Chapter 5, Social inception: Promoting your apps with apps. In this chapter, it mentions about Email, and Facebook.
As to SMS, it's easy to implement, here is some sample code.
MFMessageComposeViewController *smsController = [[MFMessageComposeViewController alloc] init];
smsController.messageComposeDelegate = self;
smsController.body = @"check out apps, link";
[self presentModalViewController:smsController animated:YES];
[smsController release];
sampel code for email:
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 =@"check out this cool apps, link...."
[mcvc setMessageBody:defaultBody isHTML:YES];
[self presentViewController:mcvc animated:YES completion:nil];
For facebook, it's a little bit complicated. You have to use facebook SDK and reference their document. 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];
Upvotes: 7