你如何与Instagram分享.mp4视频文件?我可以分享这样的图像:
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扩展名,你如何发布视频文件?