Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Instagram - share image, text and url via iOS app : swift

I am trying to share image with some text and a url from my app to Instagram which would later redirect to iOS app installed on the phone from Instagram app. I am able to share image on instagram but not with text and url. Any help related to the same would be great!

like image 798
Preetika Avatar asked Dec 16 '25 12:12

Preetika


1 Answers

A Bit Late To Answer (Aug, 2022)

I have successfully cracked the plain text sharing on Instagram by myself, after doing a lot of research on google on this topic. You can use the mentioned deep link to open Instagram Direct with some text to share from your application,

instagram://sharesheet?text={AnyTextOrLinkToShare}

Moreover, the below code should work on iOS to launch Instagram Direct (Messenger) from your app with some content

if let url = URL(string: "instagram://sharesheet?text=https://google.com/") {
   UIApplication.shared.open(url, options: [:], completionHandler: nil)
}

Not sure, why did they hide this information from their official documentation but now who cares, I have achieved it with the continuous efforts of 16-18 hrs! :)

like image 183
Arsal Imam Avatar answered Dec 19 '25 14:12

Arsal Imam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!