2016-02-07 34 views

回答

2

不,这不可能派专人使用WhatsApp的消息,而不存储在通讯录的数量。而之所以说是正是你想做什么:WhatsApp的将不允许您发送的随机数“垃圾邮件”。你必须收集号码,并将其添加到您的联系人,然后手动发送他们的消息。

0

它的可能!试图用迅疾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") 
      } 
     } 
    }