Reputation: 1328
We can open conversation/chat window for WhatsApp by using URL Scheme:
if schemeAvailable("whatsapp://")
{
UIApplication.sharedApplication().openURL(NSURL(string: "whatsapp://send?abid=68")!)//68 is the example, addressbook contact id
}
else
{
UIApplication.sharedApplication().openURL(NSURL(string: "https://itunes.apple.com/app/whatsapp-messenger/id310633997")!)
}
I want url scheme to start call? I not found any documentation or reference for it either on WhatsApp official page or on any blog. Can we do this or its not possible?
Upvotes: 2
Views: 1691
Reputation: 1411
You can use the following url to directly open contact and use
click to chat feature
on whatsapp to any contact number
UIApplication.sharedApplication().openURL(NSURL(string: "whatsapp://send?phone=15551234567")!)
see that also https://faq.whatsapp.com/en/android/26000030/?category=5245251
Upvotes: 0
Reputation: 5435
Currently Whatsapp doesn't have URL Scheme for Call feature.
But it does have custom URL scheme to chat with a specific contact.
You can keep checking more at : https://www.whatsapp.com/faq/en/iphone/23559013.
Upvotes: 1