0
  1. My Messenger bot asks a question:

"What is your favorite color ?"

  1. My webhook receives a reply message:

"Red"

How can the webhook identify what was the question ? Do I need to store something like the "lastQuestionSent" in the database ?

standac
  • 1,027
  • 1
  • 11
  • 26

1 Answers1

0

You could keep track of it in a session for that user. Maintaining sessions will pay dividends down the line.

You could include a reference to the question in your callback payload.

Ram
  • 327
  • 2
  • 20