Pour les applications iPhone, est-il possible d'avoir un lien WhatsApp sur les produits? Une fois le lien, il enverrait un message à mon numéro de téléphone portable via WhatsApp. S'il vous plaît conseil. P>
4 Réponses :
Je ne suis pas sûr de savoir ce que vous voulez dire, mais c'est peut-être c'est ce que vous recherchez: http://www.whatsapp.com/faq/fr/iphone/23559013
Vous le faites soit de la méthode que TAFH suggérée, qui est une méthode personnalisée ou en tant que développeur d'applications iOS, je vous suggérerais d'accéder au contrôleur d'interaction de document, initialisez une uidocumentinterActionController. Celles-ci avec vous aider à gérer les interactions. Vérifiez le lien ci-dessous pour plus d'informations.
(UIDocumentInteractionController *) setupControllerWithURL: (NSURL) fileURL usingDelegate: (id <UIDocumentInteractionControllerDelegate>) interactionDelegate { UIDocumentInteractionController *interactionController = [UIDocumentInteractionController interactionControllerWithURL: fileURL]; interactionController.delegate = interactionDelegate; return interactionController; }
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
Vous devriez regarder sous le lien ci-dessous p>
http://handleopenurl.com/scheme/833 p>
Cela vous donnera toutes les options d'open URL Scheme pour toutes les applications et vous pouvez également enregistrer votre application. p>