For the iPhone Apps, is it possible to have a Whatsapp link on products? Once link it would send a message to my mobile number through whatsapp. Please advice.
You do it either of the method as tafh suggested which is custom method or as an iOS app developer I would suggest you to go with document interaction controller, initialize a UIDocumentInteractionController. These both with help you manage interactions. Check the link below for more information.
(UIDocumentInteractionController *) setupControllerWithURL: (NSURL) fileURL
usingDelegate: (id <UIDocumentInteractionControllerDelegate>) interactionDelegate {
UIDocumentInteractionController *interactionController =
[UIDocumentInteractionController interactionControllerWithURL: fileURL];
interactionController.delegate = interactionDelegate;
return interactionController;
}
Here
I'm not sure exactly what you mean but perhaps this is what you're looking for: http://www.whatsapp.com/faq/en/iphone/23559013
NSURL *whatsappURL = [NSURL URLWithString:@"whatsapp://send?text=Hello%2C%20World!"];
if ([[UIApplication sharedApplication] canOpenURL: whatsappURL]) {
[[UIApplication sharedApplication] openURL: whatsappURL];
}
you should look at below link
http://handleopenurl.com/scheme/833
it will give you all open url scheme option for all apps and you can register your app as well.
notification = @"Your Daily Inspiration by the ";
notification = [notification stringByAppendingString:@"\n"];
notification = [notification stringByAppendingString:textview.text];
NSString *whats=notification;
NSString *baseURL = [NSString stringWithFormat:@"whatsapp://send?text=%@",whats];
NSURL *url = [NSURL URLWithString:[baseURL stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
if ([[UIApplication sharedApplication] canOpenURL: url]) {
[[UIApplication sharedApplication] openURL: url];
}
else
{
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Sorry"
message:@"You can't send a thought on Whatsapp"
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView show];
}
used this code i m sending following string on whatsapp