Great to have PHP Wechaty onboard to our Multi-language Wechaty Community!
huan opened this issue · 4 comments
huan commented
Link to wechaty/wechaty#1927
zhangchunsheng commented
alpha version, start bot like
$wechaty = \IO\Github\Wechaty\Wechaty::getInstance($token, $endPoint);
$wechaty->onScan(function($qrcode, $status, $data) {
$qr = \IO\Github\Wechaty\Util\QrcodeUtils::getQr($qrcode);
echo "$qr\n\nOnline Image: https://wechaty.github.io/qrcode/$qrcode\n";
})->onLogin(function(\IO\Github\Wechaty\User\ContactSelf $user) {
})->onMessage(function(\IO\Github\Wechaty\User\Message $message) {
$message->say("hello from PHP7.4");
})->start();
huan commented
Awesome, great to see our PHP Wechaty for building a chatbot in 6 lines of PHP!
It would be great if we could have a getting start repository like https://github.com/wechaty/python-wechaty-getting-started so that our PHP developers can be easy to get started!
zhangchunsheng commented
I create a getting start repository https://github.com/wechaty/php-wechaty-getting-started
huan commented
Awesome! Would love to play with it later, thank you very much for the efforts for making the pho getting start to be easy!