How to Show “Get Started” Button on Facebook Messenger for Dialogflow Chatbot

alex.gu

--

I’ve been working on building a chatbot that uses Facebook Messenger as its front-end tier, Dialogflow as its processing Tier for NLP and Firebase as its back-end fulfilment tier for storing functions and database.

I ran into a weird issue recently that when a user just entered a conversation, Messenger wouldn’t prompt with a “Get Started” Button for the agent I’m building now like on the picture below, but would for another chatbot that I own, even though they both have the same “Default Welcome Intent”.

There are a few people on Stack Overflow that have encountered this problem too, but I did not have any success following their solutions, luckily after some more diggings, I found this documentation page provided by Facebook: https://developers.facebook.com/docs/messenger-platform/discovery/welcome-screen/

This is exactly what we need for solving this problem, firstly we should go find our <PAGE_ACCESS_TOKEN> , go to your app’s page on Facebook for Developers, then to Messenger => Settings, click on “Generate Token” under “Access Tokens”.

Secondly, we need to use a software called postman agent, a very handy tool for testing and making API requests. Open it up and then choose post method tohttps://graph.facebook.com/v2.6/me/messenger_profile?access_token=<PAGE_ACCESS_TOKEN> , replace the <Page_Access_Token> with the token we got from the first step. And in “body” we select “raw” and “JSON”, enter

and finally click on “send”.

You’ll see response

if it was successful.

Go to your agent now and you’ll see this.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

alex.gu
alex.gu

Written by alex.gu

0 Followers

Hi, I'm a Software Developer based in Ireland. https://github.com/YutongGu-Creator.

No responses yet

Write a response