Ios Instagram iphone挂钩说明

Ios Instagram iphone挂钩说明,ios,iphone,hook,instagram,Ios,Iphone,Hook,Instagram,我正在尝试创建一个应用程序,在我的应用程序中编辑图片后,它会在其中打开instagram。我希望它在进入instagram时在描述中包含一个标签,但我似乎不知道如何实现它。iphone挂起了标签线,但我不知道放在哪里。下面是我的代码 NSURL *instagramURL = [NSURL URLWithString:@"instagram://app"]; if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) { do

我正在尝试创建一个应用程序,在我的应用程序中编辑图片后,它会在其中打开instagram。我希望它在进入instagram时在描述中包含一个标签,但我似乎不知道如何实现它。iphone挂起了标签线,但我不知道放在哪里。下面是我的代码

NSURL *instagramURL = [NSURL URLWithString:@"instagram://app"];
if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) {
docInteraction.delegate = self;
Saves the edited Image to directory
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *savedImagePath = [documentsDirectory stringByAppendingPathComponent:@"instaFilterx.jpg"];
UIImage *image = combinedImage;
NSData *imageData = UIImagePNGRepresentation(image);
[imageData writeToFile:savedImagePath atomically:NO];

    //Loads the edited Image
NSString *getImagePath = [documentsDirectory stringByAppendingPathComponent:@"instaFilterx.jpg"];
UIImage *tempImage = [UIImage imageWithContentsOfFile:getImagePath];

Hooks the edited Image with Instagram
NSString  *jpgPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/instaFilterx.igo"];
[UIImageJPEGRepresentation(tempImage, 1.0) writeToFile:jpgPath atomically:YES];

Prepares the DocumentInteraction with the .igo image for Instagram
NSURL *instagramImageURL = [[NSURL alloc] initFileURLWithPath:jpgPath];
docInteraction = [UIDocumentInteractionController
interactionControllerWithURL:instagramImageURL];
[docInteraction setUTI:@"com.instagram.exclusivegram"];eciate any help. Thank you.

在Instagram帖子中添加标题。请执行以下操作:

docInteraction.annotation=[NSDictionary dictionaryWithObjectsAndKeys:@"Your #Text", @"InstagramCaption", nil];
希望这有帮助