Closed alvin-reyes closed 7 years ago
Fixed this by setting the button type upon creating the Get Started button.
public static void setGetStartedButton(String payload) {
if (payload == null || payload.isEmpty()) {
logger.error("FbBotMill validation error: Get Started Button payload can't be null or empty!");
return;
}
Button button = new PostbackButton(null, ButtonType.POSTBACK, payload);
List<Button> buttonList = new ArrayList<Button>();
buttonList.add(button);
CallToActionsRequest request = new CallToActionsRequest(
ThreadState.NEW_THREAD, buttonList);
NetworkUtils.postThreadSetting(request);
}
Whenever I try to create a get started button via
FbBotMillThreadSettingsConfiguration.setGetStartedButton("Get Started Button Payload");
it gives me the following exception: