我想在我的应用程序中集成WhatsApp
共享,但我不想使用UIDocumentInteractionController
。有没有办法使用url scheme
分享图像?就像我们使用url方案使用以下代码共享文本一样
var whatsappURL:NSURL?= NSURL(string: "whatsapp://send?text=Hello%2C%20World!")
if (UIApplication.shared.canOpenURL(whatsappURL)) {
UIApplication.shared.openURL(whatsappURL)
}
我想你做不到。
首先,Whatapps只支持通过qazxsw poi发送文本。其次,如何将图像放入url String中?将其转换为base64字符串?
您只能使用URLScheme
发送图像