This is an open source Facebook Messenger Chatbot for surveys built using Ruby on Rails. You can connect it to a facebook page and use it to ask questions, save the answers, and interact with users.
It uses Ruby, Rails, and a PostgresQL database. For full documentation and a tutorial on how to get started using the code, please visit https://www.mattmorgante.com/technology/open-source-survey-bot-facebook