ekkalak / line-notify
使用PHP向LINE Notify发送消息
1.0.2
2020-04-03 05:44 UTC
Requires
- php: >=5.6
- guzzlehttp/guzzle: >=6.5.1
This package is auto-updated.
Last update: 2024-09-29 05:48:46 UTC
README
使用PHP向LINE Notify发送消息。
要求
- Line Token https://notify-bot.line.me/en/
- PHP
- Composer
- Guzzle客户端
安装
composer require ekkalak/line-notify
用法
<?php require_once '../vendor/autoload.php'; use Ekkalak\Line\LineNotify; $notify = new LineNotify('YOUR-TOKEN-HERE'); // Send text $response = $notify->sendText($text); // i.e. $response = $notify->sendText("Hello test"); // Send sticker // Sticker List: // https://devdocs.line.me/files/sticker_list.pdf // https://developers.line.biz/media/messaging-api/sticker_list.pdf $response = $notify->sendSticker($stickerPackageId, $stickerId); // i.e. $response = $notify->sendSticker(4, 300); var_dump($response);