如何使用 Swift 分享 Snapchat 的链接?

问题描述 投票:0回答:1

我正在尝试找到一种使用

snapchat://
方案打开 snapchat 的方法,以便我可以将链接传递到共享屏幕(参见附图),但我总是收到“出了问题”警报。

这是我尝试过的:

let shareString = "snapchat://text=\(text)&url=https://www.google.com"
let escapedShareString = shareString.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)!

let shareString = "snapchat://url=https://www.google.com"
let escapedShareString = shareString.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)!

let shareString = "snapchat://text=https://www.google.com"
let escapedShareString = shareString.addingPercentEncoding(withAllowedCharacters: CharacterSet.urlQueryAllowed)!

有什么想法吗? image

swift deep-linking snapchat
1个回答
0
投票

我认为

snapchat://share?url=uriEncodeURLHere
应该有效

© www.soinside.com 2019 - 2024. All rights reserved.