diff --git a/README.md b/README.md index d9a28d1..d7ae178 100644 --- a/README.md +++ b/README.md @@ -268,12 +268,13 @@ $whatsapp_cloud_api->sendCatalog( ``` ### Send a button reply message - +Button reply with Text Header ```php sendButton( '', 'Would you like to rate us on Trustpilot?', $action, - 'RATE US', // Optional: Specify a header (type "text") + $header, // Optional, can be text, image, video, or document 'Please choose an option' // Optional: Specify a footer ); ``` +Button Reply with Image Header +```php +use Netflie\WhatsAppCloudApi\Message\ButtonReply\ImageHeader; +use Netflie\WhatsAppCloudApi\Message\Media\LinkID; + +$link_id = new LinkID('http(s)://image-url'); +$header = new ImageHeader($link_id); + +//or + +$media_id = new MediaObjectID(''); +$header = new ImageHeader($media_id); +``` + +Button Reply with Video Header +```php +use Netflie\WhatsAppCloudApi\Message\ButtonReply\VideoHeader; +use Netflie\WhatsAppCloudApi\Message\Media\LinkID; + +$link_id = new LinkID('http(s)://video-url'); +$header = new VideoHeader($link_id); + +//or + +$media_id = new MediaObjectID(''); +$header = new VideoHeader($media_id); +``` + +Button Reply with Document Header +```php +use Netflie\WhatsAppCloudApi\Message\ButtonReply\DocumentHeader; +use Netflie\WhatsAppCloudApi\Message\Media\LinkID; + +$filename = 'whatsapp-cloud-api-from-url.pdf'; +$link_id = new LinkID('http(s)://document-url'); +$header = new DocumentHeader($link_id); + +//or + +$filename = 'whatsapp-cloud-api-from-id.pdf'; +$media_id = new MediaObjectID(''); +$header = new DocumentoHeader($media_id,); +``` + ### Send Multi Product Message ```php