Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Christoph Rumpel:
Using Facebook Messenger Quick Replies with BotMan
Jul 03, 2018 @ 10:53:08

Christoph Rumpel, lead developer on the BotMan chatbot project, has a new tutorial posted to his site showing how to use Facebook Quick Replies with a BotMan instance.

I guess you already used quick replies for text buttons, right? But did you know that you can ask the user for email, phone number, and current location? It is time to give you a refresh of Facebook Messenger quick replies and how they work in the BotMan chatbot framework.

The post includes a video of the process of integrating these quick replies but also steps through all of the code required. Adding the replies is as easy as using the Button functionality included with the package and adding listeners. The tutorial also shows how to use them in conversations (rather than just one-off calls). It also provides a more "real world" example of asking the user for location, phone number and email with quick replies.

tagged: botman chatbot framework tutorial facebook messenger quickreply button

Link: https://christoph-rumpel.com/2018/07/using-facebook-messenger-quick-replies-with-botman

Christoph Rumpel:
How I Built The LaravelQuiz Chatbot With BotMan and Laravel
May 28, 2018 @ 09:09:14

Christoph Rumpel, lead developer on the BotMan project has a new post to his site walking you through the process and code he used to create a LaravelQuiz chatbot using a combination of the library and Laravel.

Ever wondered how well you know your favorite PHP framework Laravel? Give the LaravelQuiz Chatbot a try, and you will find out. This article is a step by step guide on how I created this chatbot with BotMan and Laravel.

He starts off by introducing the project and what some of the basic features are. Next comes some of the setup, including the botman command line tool and the creation of the BotMan-based project. As the tool uses a connection to Telegram, he also installs the client library for that and sets up the related credentials. Next comes the storage of the questions and answers (migrations and models) and the creation of the QuizConversation class to handle the interactions. There's also code examples for showing the current quiz status, making a "high score" list, and a few other extras. All code and command line calls you need are included in the post.

tagged: laravel quiz botman chatbot tutorial question highscore answer

Link: https://christoph-rumpel.com/2018/05/how-i-built-the-laravelquiz-chatbot-with-botman-and-laravel

Freek van Der Herten:
Automatically close stale issues and pull requests
May 02, 2018 @ 09:31:17

In a post to his site Freek van Der Herten shares some functionality that Spatie uses to help keep the stale pull requests under control across their 180+ repositories: a Botman-based bot that assesses the last updated date and closes after a given amount of time.

At Spatie we have over 180 public repositories. Some of our packages have become quite popular. We're very grateful that many of our users open up issues and PRs to ask questions, notify us of problems and try to solve those problems, ...

Most of these issues and PRs are handled by our team. But sometimes those issues and PRs become stale. [...] That's why we created a bot that can automatically close stale issues and PRs. Here's [an example] of the bot in action.

He then shares the code they currently use for the bot, making use of the BotMan package as a base and the knp-labs/github-api package for the GitHub interaction. The code includes the GitHub service provider, a client class, an Issue object and the command that's run to find and close out the stale pull requests and issues.

tagged: stale pullrequest issue github automatically close bot botman tutorial

Link: https://murze.be/automatically-close-stale-issues-and-pull-requests

Scotch.io:
Build A Telegram Bot with Laravel and BotMan
Mar 07, 2018 @ 10:17:49

On the Scotch.io site there's a tutorial posted showing you how to create a Telegram bot with BotMan the popular PHP package for creating chatbots.

Being a Scotch.io reader you definitely know that we have covered creating Bots before, we have quite few posts on Slack Bots, Twitter Bots and other related topics [...] But today, we have something different for you, today we will be creating a Telegram bot for dog lovers. Yes, you heard it right. A Telegram Bot for dog lovers using Dog API.

The tutorial then walks through the entire process of getting the bot up and running including:

  • Installation of Laravel and BotMan
  • Creating the commands and testing the bot
  • Installing the Telegram driver and creating the bot
  • Using ngrok to allow external calls to come into your internal application

The post finishes by showing how to link your bot to Telegram and test it out using messages to send you random dog pictures when requested.

tagged: scotchio telegram bot botman tutorial setup configure connect

Link: https://scotch.io/tutorials/build-a-telegram-bot-with-laravel-and-botman

Christoph Rumpel:
The BotMan WebDriver explained
Feb 14, 2018 @ 10:23:10

In this post to his site Christoph Rumpel covers a feature of the Botman chatbot library in a bit more depth: the WebDriver making interaction with the bot in a current application simpler.

The WebDriver is one of the best features about the BotMan library. Still I see a lot of people struggling with the concept and how to use it. Let's clear things up and let me show you how I already used this driver in production.

He starts off by talking about chatbots in general and how they're "more than just messengers" and can provide more real-time information to visitors to your site. In order to enhance the basic bot functionality, it needs to work with another source - in this case an API accessed via the WebDriver. He then gets into some example code showing how to use the driver to access an API and some explanation of the pieces involved.

tagged: botman chatbot webdriver driver tutorial introduction example

Link: https://christoph-rumpel.com/2018/02/the-botman-webdriver-explained

Laravel News:
Botman Playground: Start Your Next Chatbot Idea In Your Browser
Feb 13, 2018 @ 09:35:58

On the Laravel News site there's a new post covering a new feature in Marcel Pociot's "Building a Chatbot" series (that makes use of the Botman package). This latest addition, a playground for testing and debugging bots allows you to get up and running without having to set up a complete environment.

Marcel Pociot recently launched a course called “Build A Chatbot,” a step-by-step video course on developing, extending, and testing Chatbots and Voicebots. Marcel is the author of Botman, a PHP chatbot framework for building chatbots.

Along with his Build a Chatbot course, Marcel launched Botman Playground, which provides a quick way to get started building and debugging chatbots without setting up a local development environment.

The playground allows you to set up a new bot, add commands and test the result with an included widget, all in-browser. The playground also allows you to set up connections to external services like Facebook, Telegram and Cisco Spark. The only catch is that you must be signed up for Marcel's Build a Chatbot course to gain access.

tagged: chatbot playground botman browser code test widget

Link: https://laravel-news.com/botman-playground

Nicola Malizia:
Make your Telegram bot with Laravel and BotMan
Sep 13, 2017 @ 09:41:54

Nicola Malizia has written up a post showing you how to create a Telegram bot using Laravel and the BotMan package. BotMan is a project that seeks to make it easier to work with chat commands directly in an application with some handy tools included.

After a long time I’m here to talk about Telegram bots. Lately, I discovered a nice PHP library for building Telegram Bots and I want now to show you it’s potential? - ?BotMan.

BotMan is a framework agnostic PHP library that is designed to simplify the task of developing innovative bots for multiple messaging platforms, including Slack, Telegram, Microsoft Bot Framework, Nexmo, HipChat, Facebook Messenger, WeChat and many more.

The best part of this library is that you can integrate with Laravel, thus taking benefit of the vast ecosystem around it.

He then walks you through the installation of the BotMan package and creation of a simple "Hello world" kind of bot. He then shows how to install the driver for the Telegram. He then shows how to connect the bot to Telegram, execute it and expose it to the world via ngrok and how to test it out. He finishes the post with a more real world situation: creating a bot that allows users to subscribe and receive broadcasts when an announcement is made.

tagged: botman chatbot tutorial laravel telegram subscribe

Link: https://unnikked.ga/make-your-telegram-bot-with-laravel-and-botman-b8199e58461d

Christoph Rumpel:
Build a Facebook Messenger chatbot in Laravel with BotMan Studio 2.0
Sep 08, 2017 @ 09:26:01

Christoph Rumpel has written up a tutorial on his site showing you how to use Larave and the Botman package to create a simple chatbot for use on Facebook.

With BotMan it is really easy to setup a Facebook chatbot. This week the new 2.0 version was released. We will checkout how to setup a Facebook Messenger chatbot in this new version with BotMan Studio.

He starts with a list of requirements to be sure you have installed before proceeding. He then helps you get the Botman software installed and the command to bootstrap a Facebook bot instance. He includes instructions on how to test the bot and how to configure it to work with a Facebook application (requiring relevant token/secret information). From there he shows you how to set up the Facebook application and connect the bot to it via a webhook. The ngrok tool makes this easier as it exposes your local Laravel application on an external URL for testing. Finally, he shows how to test the integration by sending a few sample messages to the bot and getting responses.

tagged: facebook messenger chatbot laravel botman studio tutorial

Link: http://christoph-rumpel.com/2017/09/build-a-facebook-chatbot-with-laravel-and-botman-studio/

Laravel News:
BotMan 2.0 PHP Chatbot Framework
Sep 01, 2017 @ 09:20:20

On the Laravel News site today there's a new post covering the release of BotMan v2.0, one of the more popular chatbot libraries for PHP.

BotMan is a framework agnostic PHP Chatbot framework designed to simplify the task of developing innovative bots for multiple messaging platforms, including Slack, Telegram, Microsoft Bot Framework, Nexmo, HipChat, Facebook Messenger, WeChat and many more.

BotMan 2.0 was released earlier this week with a bunch of improvements and exciting changes.

As a part of this new release, functionality was abstracted out into separate repositories making it easier to maintain those features without having to change core code. They then include an example of using the the library to create a simple chatbot that replies to a simple "hello" message. They also cover some of the more advanced features including middleware handling and natural language processing support. There's also a tool, BotMan Studio, that's included with the package to help make testing your chatbot script easier. The post wraps up with an example of using this to test the chatbot and a list of some of the other new features in v2.0.

tagged: botman chatbot framework release v2 overview example

Link: https://laravel-news.com/botman-php-chatbot

Christoph Rumpel:
Build a Telegram group bot in PHP
Mar 06, 2017 @ 13:48:41

Christoph Rumpel has a tutorial posted on his site showing how to create a Telegram group bot using a bit of PHP and the BotMan library.

Working with Facebook Messengers bots is great, but there is one thing still missing: group bots! This is why we will built a little Telegram bot today and use it inside my FantasticBurger group.

First thing to keep in mind here is that a group chatbot can be very different from a 1:1 conversation chatbot. In groups chatbots are often not a direct conversation partner but more a quiet assistant.

He briefly talks about why he created the bot and how to go and set up your own Telegraph bot with a simple first command. He then walks through the set up of the BotMan library and connecting it back to the Telegraph service (via an API call) and a simple handler that returns a "Hi there" message when the bot hears the string "Hello".

tagged: tutorial telegraph bot botman group facebook

Link: http://christoph-rumpel.com/2017/03/Build-A-Telegram-Group-Bot/