私のアプリケーションでは、Instagramで画像を共有しています。それは私のアプリでうまくいきます。iosのInstagramの画像とテキストを共有
私は次のコードを使用しています。
@property (nonatomic, retain) UIDocumentInteractionController *dic;
CGRect rect = CGRectMake(0 ,0 , 0, 0);
UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, self.view.opaque, 0.0);
[self.view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIGraphicsEndImageContext();
NSString *jpgPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/test.igo"];
NSURL *igImageHookFile = [[NSURL alloc] initWithString:[[NSString alloc] initWithFormat:@"file://%@", jpgPath]];
// NSURL *igImageHookFile = [[NSURL alloc] initWithString:[[NSString alloc] initWithFormat:@"file://%@", screenshot]];
self.dic.UTI = @"com.instagram.photo";
self.dic = [self setupControllerWithURL:igImageHookFile usingDelegate:self];
self.dic=[UIDocumentInteractionController interactionControllerWithURL:igImageHookFile];
[self.dic presentOpenInMenuFromRect: rect inView: self.view animated: YES ];
- (UIDocumentInteractionController *) setupControllerWithURL: (NSURL*) fileURL usingDelegate: (id <UIDocumentInteractionControllerDelegate>) interactionDelegate {
UIDocumentInteractionController *interactionController = [UIDocumentInteractionController interactionControllerWithURL: fileURL];
interactionController.delegate = interactionDelegate;
return interactionController;
}
ここでも画像とテキストを共有したいと考えています。
下の画像のようになります。 "字幕を書く"では、例えば、いくつかのデフォルトカスタムテキストが必要です。 "この写真を共有する"。
どうすればいいですか?
事前に感謝しますが...
編集
私は、画像を共有するための私のアプリからInstagramのを開封しておりますし、それが正常に動作します。
しかし、それは可能ですか?ユーザーがそれを正常に共有しているかどうかを確認できますか?
手段ユーザーが画像を正常に共有したときに、自分のDBで何らかの操作を実行したい。
どうすればいいですか?
ねえ、これは私のために働いていません。 –
テキストと画像を追加するためのその他の設定..? –