Coder Social home page Coder Social logo

angoole's Introduction

Angoole

Angoole is a Facebook Messenger bot that reads the messages, search it on Google search and output back the results for the user.

Configuration steps

Project folder

We need to make a small change in the project folder to continue the process.

.env

First, rename the .template.env to .env

Verify Token

To facebook start using the bot, we need to generate a token for the bot, i used https://randomkeygen.com/ to generate mine, so get a token for you, copy it, open the .env and overwrite the VERIFY_TOKEN=<YOUR_RANDOM_TOKEN_GENERATED_BY_YOU> with your token.

Facebook

To make it work, we need a Facebook page, so go there and create it. Next, we need to create a Facebook App, go to https://developers.facebook.com/ (create an account if you don't have one). Go to My Apps > Create App and follow the steps shown. Once you land on the app page, go to Products and click on configure in the Messenger product.

Access Tokens

Inside this block, we need to add our page to get the page access token so we can send messages using the Messenger Api. Click on Add or remove pages, log in, select your page and follow the shown steps. Your page will be displayed in the list and next to it there will be a Generate Token, click on it and copy your page token. Next, open the .env and overwrite the PAGE_TOKEN=<YOUR_PAGE_TOKEN> with your token.

Webhooks

To configure webhooks, we first need to run our app, you can either run it with $ npm start or

$ docker-compose up(recommended)

Without Docker Compose

Run npm install and then npm start

With Docker Compose

Just run $ docker-compose up

Now bot is running locally, we need to make it accessible in the internet, you can use a server or openning your ports, in my case i use ngrok to generate a public address to access my local service.

Once you get it running publicly, add your URL. Ex: https://myurl.com/webhook And paste your Verify Token, hit verify and save. Now click on Add signatures and select messages and messages_postbacks, hit save and you are done! The bot is working for developers and testers. Go there and send a message to the bot!

I will not cover the process to make it public for everyone

angoole's People

Contributors

renandecarlo avatar wilianzilv avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.