次のコードを使用し、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 ];
}