On iOS 7.1.1, I can share image by this code on Whatsapp..
if ([[UIApplication sharedApplication] canOpenURL: [NSURL URLWithString:@"whatsapp://app"]]){
UIImage * iconImage = [UIImage imageNamed:@"image.png"];
NSString * savePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/whatsAppTmp.wai"];
[UIImageJPEGRepresentation(iconImage, 1.0) writeToFile:savePath atomically:YES];
self.docController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:savePath]];
self.docController.UTI = @"net.whatsapp.image";
self.docController.delegate = self;
//[self.docController setAnnotation:@{@"WhatsappCaption" : @"https://itunes.apple.com/us/app/epic-ar/id535122470?ls=1&mt=8"}];
[self.docController presentOpenInMenuFromRect:CGRectMake(0, 0, 0, 0) inView:appDelegate.window.rootViewController.view animated: YES];
}
But I want to share video too, I follow tutorial on Wahtsapp tutorial
But How can be the code of video path ?
I mean, What is the alternative object of UIImage object to display video ?
Also, can I share "Link" ?
Thank you,