emizoripx/whatsapp-cloudapi 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

emizoripx/whatsapp-cloudapi

最新稳定版本:v1.0.7

Composer 安装命令:

composer require emizoripx/whatsapp-cloudapi

包简介

Library for sending Whatsapp messages with the Whatsapp Cloud Api service

README 文档

README

Package for sending Whatsapp messages with the Whatsapp Cloud Api Service.

Supports

  • Send messages with a predefined template.
  • Send documents and multimedia.
  • Send buttons or links.
  • Currently supports sending to a single cell phone number.

Configure

Before use, you must configure the following parameters

  • In the .env file of the project copy and set the following environment variables
    WHATSAPP_CLOUD_API_HOST=

Usage

  • To send a message just call the Facade EmizorIpx\WhatsappMessages\Facades\WhatsappMessage to method sendWhithTemplate and specify the required parameters
    
    use EmizorIpx\WhatsappCloudapi\Facades\WhatsappCloudapiMessage;
    use EmizorIpx\WhatsappCloudapi\Messages\Template\Component;
    use EmizorIpx\WhatsappCloudapi\Services\Whatsapp\Settings\WhatsappCloudApiSettings;
    ...

    $cloud_settings = new WhatsappCloudApiSettings( $from_phone_number_id, $access_token );
    $components = new Component($header_components, $body_components, $buttons_components);

    WhatsappCloudapiMessage::sendMessageWithTemplate($cloud_settings, $phone_number, $template_name, $components);
  • Parameters
    • from_phone_number_id Phone number identifier.
    • access_token whatsapp cloud api services access token.

统计信息

  • 总下载量: 752
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-18