Link Preview - Instagram Share Sheet

51 Views Asked by At

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?

0

There are 0 best solutions below