2012-12-15 42 views
0

您能否告訴我,我做錯了什麼,該照片未顯示在新Instagram中?它根本沒有出口。Instagram iPhone掛鉤 - 未導出照片

編輯:我看到的問題是,它不顯示在Instagram的預覽。當我去「下一步」時,可以看到縮略圖。如果有問題,我的輸出圖片是1000x1000。

NSString *savePath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Image.igo"]; 

// Write image to PNG 
[UIImageJPEGRepresentation(preview.image, 1.0) writeToFile:savePath atomically:YES]; 

NSURL *instagramURL = [NSURL URLWithString:@"instagram://app"]; 

if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) 
{ 
    //imageToUpload is a file path with .ig file extension 
    documentInteractionController = [UIDocumentInteractionController interactionControllerWithURL:[NSURL fileURLWithPath:savePath]]; 

    documentInteractionController.UTI = @"com.instagram.exclusivegram"; 
    documentInteractionController.delegate = self; 

    documentInteractionController.annotation = [NSDictionary dictionaryWithObject:@"bla bla bla" forKey:@"InstagramCaption"]; 
    [documentInteractionController presentOpenInMenuFromRect:CGRectZero inView:self.view animated:YES]; 

回答