This is the method that have the image data, that image will than write to camera roll
CGImageRef cgImageResult = [self newSquareOverlayedImageForFeatures:features
inCGImage:srcImage
withOrientation:curDeviceOrientation
frontFacing:isUsingFrontFacingCamera];
if (srcImage)
CFRelease(srcImage);
CFDictionaryRef attachments = CMCopyDictionaryOfAttachments(kCFAllocatorDefault,
imageDataSampleBuffer,
kCMAttachmentMode_ShouldPropagate);
[self writeCGImageToCameraRoll:cgImageResult withMetadata:(id)attachments];
Convert the
CGImage
toUIImage
like so:UIImage *image = [UIImage imageWithCGImage:<#(CGImageRef)#>];
and post it to facebook as you have mentioned on your comments. Good Luck!EDIT Okay, do it like this: