ekkalak/line-notify

使用PHP向LINE Notify发送消息

1.0.2 2020-04-03 05:44 UTC

This package is auto-updated.

Last update: 2024-09-29 05:48:46 UTC


README

使用PHP向LINE Notify发送消息。

要求

安装

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);