Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WhatsApp url scheme for iPhone app

We are developing an iPhone app and planning to integrate Whatsapp.

Is there a way to enable click to call / message from the iPhone app? Skype allows this by following:

<a href="skype:skypehandle?call"> Skype </a>

Is there an equivalent for Whatsapp ?

like image 920
Shameem Avatar asked Jan 22 '12 01:01

Shameem


3 Answers

currently Whatsapp doesn't have a registered URL scheme.

You can check if you favourite apps support them by inspecting the contents of the apps info.plist.

I'm sure there are windows equivalents but I use a mac, so have a free app called iPhone Explorer (now renamed to iExplorer) installed which mounts the phone as a drive and allows you to view app contents via a tree structure. No jailbreak required. The info.plist is in the chosen apps appname.app folder. copy this to your desktop and open the file. Look for the 'URL types' key and expand. This is the URL that when :// is added will open in safari or with the UIApplication openURL method.

update - November 2012 - latest version now adds URL scheme.
whatsapp://

don't know if it has any 'actions' associated with it though.

update - Nov 2013 Whatsapp blog has info on the actions that can be performed http://www.whatsapp.com/faq/en/iphone/23559013

like image 148
Nik Burns Avatar answered Nov 15 '22 18:11

Nik Burns


17/07/2013 Since yesterday's update, whatsapp has a public URL Scheme:

Whatsapp official URL Scheme

like image 31
Marioea Avatar answered Nov 15 '22 20:11

Marioea


NSURL *whatsappURL = [NSURL URLWithString:@"whatsapp://location?id=1"];

 if ([[UIApplication sharedApplication] canOpenURL:whatsappURL]) {
        [[UIApplication sharedApplication] openURL:whatsappURL]]];
 }
like image 29
Amit Avatar answered Nov 15 '22 18:11

Amit