是有可能发送WhatsApp的消息,这是没有存储在通讯录特定的WhatsApp账户(phonenumer)?WhatsApp的URL模式发送消息给PHONENUMBER
想在我的网站上设置whatsapp url方案,通过whatsapp提供直接联系。
是有可能发送WhatsApp的消息,这是没有存储在通讯录特定的WhatsApp账户(phonenumer)?WhatsApp的URL模式发送消息给PHONENUMBER
想在我的网站上设置whatsapp url方案,通过whatsapp提供直接联系。
不,这不可能派专人使用WhatsApp的消息,而不存储在通讯录的数量。而之所以说是正是你想做什么:WhatsApp的将不允许您发送的随机数“垃圾邮件”。你必须收集号码,并将其添加到您的联系人,然后手动发送他们的消息。
它的可能!试图用迅疾3和的Xcode 8.3.2。
let date = Date()
let msg = "Hi my dear friends\(date)"
let urlWhats = "whatsapp://send?phone=phoneNumber&abid=phoneNumber&text=hi"
if let urlString = urlWhats.addingPercentEncoding(withAllowedCharacters: NSCharacterSet.urlQueryAllowed) {
if let whatsappURL = NSURL(string: urlString) {
if UIApplication.shared.canOpenURL(whatsappURL as URL) {
UIApplication.shared.openURL(whatsappURL as URL)
} else {
print("please install watsapp")
}
}
}