How to add photo and title to instagram share sheet?
Using url tag works but unsure how to add image and title
Here is my code:
func shareToInstagram(with url: URL) {
let imagepngdata = UIImage.pic1.pngData()
if let url = URL(string: "instagram://sharesheet?url=\(url)") {
UIApplication.shared.open(url, options: [:], completionHandler: { _ in
EventTracker.log(.invite_friend_done, withEventProperties: ["Channel": "Instagram handle"])})
}
}
Now, how do I pass ui image and title for this preview to have these inside when I share via IG DM?