This repository contains the code for a working Facebook Messenger Chatbot that allows users to search for animated gifs and then apply instant image transformations to those gifs and receive back the transformed gif.
In order to use this application you need to have:
- Ruby on Rails installed locally
- Nexmo Account and API Credentials
- GIPHY Developer Account and API credentials
- Cloudinary Account and API Credentials
To install and use this application:
- Clone the repository
- Rename the
.env.sample
file to.env
- Fill in your API credentials in the
.env
file - Run
bundle install
andrake db:migrate
to initialize your Rails application - Start your Rails server with
bundle exec rails start
- Make sure your Rails server is externally available. (Using ngrok is a great way to do that in development)
- Provide your externally available webhook status and inbound URLs (
#{YOUR_URL}/inbound
and#{YOUR_URL}/status
) to your Nexmo Application set-up so you can receive incoming Facebook chat messages - Link your Nexmo Application to your Facebook Page (See this guide on how to do that)
- Search for an animated gif by sending a message to your linked Facebook page in the following format:
search #{item}
, i.e.search hummus
- Send a subsequent transformation request in the following message format:
transform #{transformation}
, i.e.transform sepia
We ❤️ contributions from everyone! Bug reports, bug fixes and feedback on the library is always appreciated. Look at the Contributor Guidelines for more information and please follow the GitHub Flow.
This project is under the MIT LICENSE.