<?php
require_once 'LineBot.php';
require_once 'LineSend.php';
require_once 'LineRecv.php';
$config = [
'endpointHost' => 'trialbot-api.line.me',
'channel' => [
'id' => $_ENV['LINE_CHANNEL_ID'],
'secret' => $_ENV['LINE_CHANNEL_SECRET'],
'mid' => $_ENV['LINE_BOT_MID'],
]
];
$lineRecv = new LineRecv($config);
$response = $lineRecv->receive();
$lineSender = new LineSend($config);
foreach ($response->result as $result) {
$userId = $result->content->from;
$text = $result->content->text;
$result = $lineSender->sendText([ $userId ], $text);
}
-
Notifications
You must be signed in to change notification settings - Fork 0
License
yukato/linebot
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published