【发布时间】:2019-10-11 07:56:48
【问题描述】:
我已经实现了分享到在 iOS 12 上运行良好但在 iOS 13 上运行良好的 insta 故事。
我已经尝试/验证了以下几点
- 经过验证的 URL 方案
- 检查 UIPasteBoard 的更改
- 经过验证的资产网址
一切都按照文档:https://developers.facebook.com/docs/instagram/sharing-to-stories/
if schemeAvailable(scheme: "instagram-stories://share"){
let pasteboardItems = ["com.instagram.sharedSticker.backgroundImage":UIImagePNGRepresentation(postImage!)!,
"com.instagram.sharedSticker.contentURL":"http://google.com"] as [String : Any]
UIPasteboard.general.setItems([pasteboardItems])
UIApplication.shared.open(URL(string: "instagram-stories://share")!, options: [:], completionHandler: { (finished) in
print("")
})
}else{
print("Can't open URL")
}
【问题讨论】:
标签: ios swift instagram-api url-scheme uipasteboard