Как поделиться видеофайлом .mp4 в Instagram? Я могу поделиться такими изображениями:
NSString* filename = [NSString stringWithFormat:@"testImage.igo"];
NSString* savePath = [imagesPath stringByAppendingPathComponent:filename];
[UIImagePNGRepresentation(myImage) writeToFile:savePath atomically:YES];
NSURL *instagramURL = [NSURL URLWithString:@"instagram://app"];
if ([[UIApplication sharedApplication] canOpenURL:instagramURL])
{
self.documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:savePath]];
self.documentInteractionController.UTI = @"com.instagram.exclusivegram";
self.documentInteractionController.delegate = self;
[self.documentInteractionController presentOpenInMenuFromRect:CGRectZero inView:self.view animated:YES];
}
Но это работает только для изображений. Я попытался переименовать видео в testVideo.igo, но это привело к пустому видео. Если Instagram требует, чтобы файлы имели расширение .igo, как вы публикуете видеофайл?