Описание крючков для iphone в инстаграм

Я пытаюсь создать приложение, в котором оно открывает 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.

person user3917008    schedule 07.08.2014    source источник


Ответы (1)


Чтобы добавить подпись к сообщению в Instagram. Сделайте следующее:

docInteraction.annotation=[NSDictionary dictionaryWithObjectsAndKeys:@"Your #Text", @"InstagramCaption", nil];

Надеюсь это поможет.

person Lee    schedule 03.09.2014