penicylline/skype-bot-sdk
Composer 安装命令:
composer require penicylline/skype-bot-sdk
包简介
PHP SDK for Microsoft skype bot framework
README 文档
README
Skype bot framework PHP sdk
How to use
Create new application, get app id and app password
https://apps.dev.microsoft.com/#/quickstart/skypebot
Create your bot
https://dev.botframework.com/bots/new
Set your bot's "Messaging endpoint" to https://yourdomain/listener.php
Installation
composer require penicylline/skype-bot-sdk or require_once <vendor_dir>/SkypeBot/autoload.php
Initialize bot
$dataStorate = new \SkypeBot\Storage\FileStorage(sys_get_temp_dir()); $config = new \SkypeBot\Config( 'YOUR SKYPE BOT ID', 'YOUR SKYPE BOT SECRET' ); $bot = \SkypeBot\SkypeBot::init($config, $dataStorate);
In your notification listener (listener.php)
$bot->getNotificationListener()->setMessageHandler( function($payload) { file_put_contents( sys_get_temp_dir() . '/conversation_id.txt', $payload->getConversation()->getId(); ); } );
Send message to conversation
$bot->getApiClient()->call( new \SkypeBot\Command\SendMessage( 'Hello World.', 'Your conversation id' ) );
统计信息
- 总下载量: 11.21k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 22
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2016-11-25