PHP code example of ekkalak / line-notify
1. Go to this page and download the library: Download ekkalak/line-notify library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ekkalak / line-notify example snippets
kalak\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);