Christoph Rumpel: Build a newsletter chatbot in PHP - Part 3
syndicated from www.phpdeveloper.org
on March 5, 2018
Christoph Rumpel has posted the third part of his series of tutorials showing you how to create a PHP chatbot making use of the BotMan package. In this new article he picks up where part two left off and shows the integration of the bot with a website.
In part one and two we created a Facebook Messenger chatbot that let your users subscribe to your newsletter. We stored that information in the database and sent out our first newsletter. In the last third part we integrate this bot to a website and write our first tests.
He starts by helping you get the Facebook JavaScript SDK up and running to link the site to the Facebook service. Once the SDK it set up (configured and included) a chatbot popup will appear on the page asking about subscribing to the newsletter via the bot. He then spends the rest of the tutorial covering testing and showing how to create tests for the fallback handling and subscription actions.