Ich integriere Instagram in meine Anwendung mit der instagram-ios-sdk
. Ich kann erfolgreich login
auf Instagram und erhalten Sie ein Zugriffs-Token, aber danach, wenn ich versuche, ein Bild mit UIDocumentInteractionController
von UIImagePickerController
, das Bild wird nicht buchen. Der Code, ein Bild zu senden ist unten angegeben:Bild nicht Beitrag auf Instagram von IOS 6
(void)_startUpload:(UIImage *) image {
NSLog(@"Image Object = %@",NSStringFromCGSize(image.size));
NSString *jpgPath = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/Test.igo"];
[UIImageJPEGRepresentation(image, 1.0) writeToFile:jpgPath atomically:YES];
NSLog(@"file url %@",jpgPath);
NSURL *igImageHookFile = [[NSURL alloc] init];
igImageHookFile = [NSURL fileURLWithPath:jpgPath];
NSLog(@"File Url = %@",igImageHookFile);
documentInteractionController.UTI = @"com.instagram.photo";
[UIDocumentInteractionController interactionControllerWithURL:igImageHookFile];
[self setupControllerWithURL:igImageHookFile usingDelegate:self];
[documentInteractionController presentOpenInMenuFromRect:CGRectZero inView:self.view animated:YES];
}
(UIDocumentInteractionController *) setupControllerWithURL: (NSURL*) fileURL usingDelegate: (id <UIDocumentInteractionControllerDelegate>) interactionDelegate {
NSLog(@"%@",fileURL);
UIDocumentInteractionController *interactionController =
[UIDocumentInteractionController interactionControllerWithURL: fileURL];
interactionController.delegate = interactionDelegate;
return interactionController;
}
ich konvertierte das Bild zu .ig
-Format mit einer Auflösung von (612 * 612). Aber das Bild wird nicht auf Instagram
gepostet. Fehle ich etwas? Kann mir jemand dabei helfen?
Dank
gleichen Problem hier. :(Wenn Sie es herausgefunden haben, können Sie mir bitte mitteilen, was Sie getan haben. –
Hat jemand von euch es herausgefunden? –