我使用了以下代码,instagram 应用程序显示了我的照片,但没有显示我想要分享的文字。
我使用了注释属性,但它不起作用。不知道哪里错了?
Instagram 版本:3.5.0
我的 iPhone 版本:5.0.1
xcode 版本:4.6
问候。
NSURL *instagramURL = [NSURL URLWithString:@"instagram://app"];
if ([[UIApplication sharedApplication] canOpenURL:instagramURL])
{
NSString *jpgPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/image.igo"];
NSString *urlString = [[NSString alloc] initWithFormat:@"file://%@", jpgPath];
NSURL *imageUrl = [[NSURL alloc] initWithString: urlString];
self.docController = [self setupControllerWithURL:imageUrl usingDelegate:self];
self.docController.UTI = @"com.instagram.exclusivegram";
self.docController.annotation = [NSDictionary dictionaryWithObject:@"I want to share this text" forKey:@"InstagramCaption"];
[self.docController presentOpenInMenuFromRect: self.view.frame inView: self.view animated: YES ];
}