Skip to content

Facebook Messenger Animated Gif Search and Transform Chatbot

License

Notifications You must be signed in to change notification settings

nexmo-community/facebook-gif-chat

Repository files navigation

Facebook Messenger Animated Gif Search and Transform Chatbot

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.

Prerequisites

In order to use this application you need to have:

Installation and Usage

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 and rake 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

Contributing

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.

License

This project is under the MIT LICENSE.