Skip to content

Thread Settings

Alvin Reyes edited this page Dec 31, 2016 · 3 revisions

FB-BotMill offers a way to configure Facebook Thread Settings. In order to do that, you will use the FaceBotThreadSettingsConfiguration class. The methods of this class are thought to be called only once, using a Java program with a main or even a jUnit. Once the method is called, the Thread Setting will be applied immediately and can be removed only calling the corresponding remove method. Here's the list of the methods you can call:

  • setGreetingMessage(String): sets a greeting message for the bot. The message will only be shown the first time the user interacts with the bot. The argument is the text to be shown.
  • setGetStartedButton(String): sets the get started button for the bot. The button will only be shown the first time the user interacts with the bot. When tapped, a payload will be sent back to the bot. The argument is the payload to send back when tapped.
  • deleteGetStartedButton: removes the get started button for the bot.
  • setPersistentMenu(List<Button>): sets a persistent menu which is always available to the user. The menu can contain at most 5 buttons. The argument is a list of buttons to be added to the menu. It's recommended (but not compulsory) to use the ButtonBuilder class to build the buttons.
  • deletePersistentMenu: removes the current persistent menu.

Checkout the code snippet section on how to code this

If you want to know more about Thread Settings, you can read the official Facebook documentation.

Clone this wiki locally