I\'ve been trying to create a sharing experience for our app where Instagram launches giving these two options:
Facebook has a pretty lean documentation about i
The only way to get to the screen illustrated above is to save first the video in the library and then use the undocumented hook instagram://library
passing the asset localIdentifier
. Don't forget to add instagram
query scheme in the info.plist
.
if UIApplication.shared.canOpenURL("instagram://app") { // has Instagram
let url = URL(string: "instagram://library?LocalIdentifier=" + videoLocalIdentifier)
if UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler:nil)
}
}