简体   繁体   中英

How to get/store last SENT messenger bot message to a user?

If a user replies with a normal text message to the bot, what would be the best way to know what happened earlier? As i have seen, the bot can't get this information from the graph api and i guess that would be the slowest option. So a dictionary or store it in database or any other idea? (in my case i use python but i think it doesn't matter in this case)

I was trying to do something similar and ended up creating a basic API backend to store answers. This was using Node.js and MongoDB but Python and MongoDB should work just as well.

If you're looking to just play around a little, mLab offers a free sandbox option that pairs easily with Heroku.

mLab: https://mlab.com/

Heroku connection information: https://elements.heroku.com/addons/mongolab

Hope that helps a little.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM