0

I have set webhook which works fine where we need to send particular reply (reply from bot) for particular string. now I need to ask question to collect user's basic details. I am capturing sendderid and receiver id in response. But not sure how to connect question with answer and store them in database.

halfer
  • 19,824
  • 17
  • 99
  • 186
Hardik Kalathiya
  • 2,221
  • 1
  • 18
  • 28
  • Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Jan 31 '18 at 18:23
  • I'm not familiar with Facebook, but this feels a bit broad. Would you outline what you have tried, or what you have found when researching this thoroughly using a search engine? – halfer Jan 31 '18 at 18:24

1 Answers1

0

So you send a message with a question, and want to store the user's response. You can probably just store the user's next response into your databse.

1) Send to user:PSID_123 "What's your favorite color"

2) Receive "blue" from message webhook from user:PSID_123

3) Store the user with psid=PSID_123's favorite color is blue in your DB.

will
  • 3,103
  • 4
  • 25
  • 30