The share-to-whatsapp plugin allows you to easily share images and PDF files directly to a specified WhatsApp number from your Ionic/Capacitor application.
npm install share-to-whatsappThe share-to-whatsapp plugin allows you to easily share images and PDF files directly to a specified WhatsApp number from your Ionic/Capacitor application.
- Capacitor 8.0.0 or higher
- iOS 13+ / Android API 22+
``bash`
npm install share-to-whatsapp
npx cap sync
* shareImage(...)
* sharePdf(...)
`typescript`
shareImage(options: { base64?: string; fileName?: string; phoneNumber?: string; message?: string; bundleId: string; }) => Promise
| Param | Type |
| ------------- | -------------------------------------------------------------------------------------------------------------- |
| options | { base64?: string; fileName?: string; phoneNumber?: string; message?: string; bundleId: string; } |
--------------------
`typescript`
sharePdf(options: { base64?: string; fileName?: string; phoneNumber?: string; message?: string; bundleId: string; }) => Promise
| Param | Type |
| ------------- | -------------------------------------------------------------------------------------------------------------- |
| options` | { base64?: string; fileName?: string; phoneNumber?: string; message?: string; bundleId: string; } |
--------------------