Integrate Whatsapp business API with Flutter application
I want to integrate Whatsapp for business API with a Flutter application. Where do i start and is this possible ? Thank you.
Tony-Marketing-API.cn is a vibrant community dedicated to Facebook, Meta,Google Ads api, app development, Instagram, and related technologies. It offers valuable bug solutions, troubleshooting cases, and problem-solving strategies shared by users. Stay updated with real-world solutions, development tips, and the latest trends in digital marketing and app development.
I want to integrate Whatsapp for business API with a Flutter application. Where do i start and is this possible ? Thank you.
You can use flutter_share_me plugin from Dart and implement some plugin setting from Android manifest and need to update Kotlin to the latest version then it's working fine to open Whatsapp Business APP.
Here are some code snippets to help you:
Use Share.whatsapp_business Switch Case
Future<void> onButtonTap(Share share, CustomerDetails customerDetails) async { String msg = "Thank you for contacting us! We will be in touch shortly"; //"Customer Name : "+customerDetails.customerName.toString()+"\n"+"Address : "+customerDetails.address+"\n"+"Mobile No. : " + customerDetails.contactNo1.toString(); String url = 'https://pub.dev/packages/flutter_share_me'; String response; final FlutterShareMe flutterShareMe = FlutterShareMe(); switch (share) { case Share.facebook: response = await flutterShareMe.shareToFacebook(url: url, msg: msg); break; case Share.twitter: response = await flutterShareMe.shareToTwitter(url: url, msg: msg); break; case Share.whatsapp_business: response = await flutterShareMe.shareToWhatsApp4Biz(msg: msg); break; case Share.share_system: response = await flutterShareMe.shareToSystem(msg: msg); break; case Share.whatsapp_personal: response = await flutterShareMe.shareWhatsAppPersonalMessage( message: msg, phoneNumber: '+91'+customerDetails.contactNo1); break; case Share.share_telegram: response = await flutterShareMe.shareToTelegram(msg: msg); break; } debugPrint(response); }