I am trying to implement posting an image to Instagram in my iOS app. I have used the code in this post.
Post UIImage to Instagram using Swift similar to SLComposeViewController
I need to change the line:
UIImageJPEGRepresentation(imageInstagram, 1.0)!.writeToFile(jpgPath, atomically: true)
to:
UIImageJPEGRepresentation(imageInstagram, 1.0)!.write(jpgPath, options: true)
for Swift 3 but then I get the error:
Cannot convert value of type 'String' to expected argument type 'URL'
Does anybody know how to fix this?
Thanks.