Coder Social home page Coder Social logo

sumonst21 / open-source-edu-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fbdevelopercircles/open-source-edu-bot

0.0 1.0 0.0 632 KB

Open Source Education bot, built by the Developer Circles community.

License: MIT License

Shell 1.90% Python 83.05% HTML 13.41% Dockerfile 1.64%

open-source-edu-bot's Introduction

PRs Welcome Open Source Love Push Container to Heroku License: MIT

Open Source Education Bot

Open Source Education Bot built by the Facebook Developer Circles community to help members contribute to open source projects.

Installation

requirement: python 3.6 or more

Start by cloning the repository locally and enter the project folder into your system.

git clone https://github.com/fbdevelopercircles/open-source-edu-bot
cd open-source-edu-bot

Method 1: Using Docker and docker-compose

If you have docker and docker-compose installed in your computer, just run

docker-compose up -d

Method 2: Without Docker and docker-compose

Create the virtual environment

python3 -m venv venv

On Windows

py -3 -m venv venv

Activate the virtual environment

Before you work on your project, activate the corresponding environment:

. venv/bin/activate

On Windows:

venv\Scripts\activate

Your shell prompt will change to show the name of the activated environment.

Install the required python packages

pip install -r requirements.txt

Set up the environment variables

Navigate to the src folder(root directory of the project):

cd src

Copy the environments file and adapt it:

cp .sample.env .env

On Windows:

copy .sample.env .env

Compile the localization files

pybabel compile -d locales

To start the application locally, run

flask run

Check your webhook with this command

In the command below, change <FB_VERIFY_TOKEN> by the value defined in .src/.env

curl -X GET "<YOUR HOST>/webhook?hub.verify_token=<FB_VERIFY_TOKEN>&hub.challenge=CHALLENGE_ACCEPTED&hub.mode=subscribe&init_bot=true"

If your webhook verification is working as expected, you should see the following:

  • WEBHOOK_VERIFIED logged to the command line where your node process is running.\
  • CHALLENGE_ACCEPTED logged to the command line where you sent the cURL request.

Then check the logs to see if the profile is setup successfully!

Setting up your Messenger App

requirements:

  • Facebook Page: Open-source-edu-bot will only be available for integration on a Facebook Page and not on your personal profile page. To create a new page, visit https://www.facebook.com/pages/create .You can create a test page or a page with any suitable name.
  • Facebook Developer Account: Required to create new apps, which are the core of any Facebook integration. You can register as a developer by going to the Facebook Developers website and clicking the "Get Started" button.
  • Facebook App: The Facebook app contains settings for your app like access tokens, which are required in the .env file. To create a new app, visit https://developers.facebook.com/ and click on Add New App

Now let's collect all tokens required for adapting your .env file.

  1. App_ID: Go to your App dashboard and then to Basic Settings, and now save your App_ID .
    You can also find your App here

  2. APP_SECRET: Go to your App dashboard and then to Basic Settings, click on Show, enter your password and now save your APP_SECRET.

  3. PAGE_ID: Go to your app Dashboard. Under Add Product, find Messenger and click Set Up.
    Now you should be in the app Messenger Settings. Under Access Tokens, click on the Add or Remove Page button and link your Facebook Page to your Messenger App.
    Now save your PAGE_ID, which is displayed below your Page name under Access Tokens.

  4. FB_PAGE_TOKEN: After completing Step 3, click on the Generate Token button and now save your FB_PAGE_TOKEN.

Testing the chatbot

The chatbot can be tested here: https://m.me/OpenSourceChatbot before deploying it to your own page.

How to contribute

The primary purpose of this repository is to continue evolving open source. We want to make contributing to this project as easy and transparent as possible, and we grateful to the community for contributing bug fixes and improvements. Read below to learn how you can participate in improving the Open Source Education Bot.

Facebook has adopted a Code of Conduct that we expect project participants to adhere to.

Please read the full text so that you can understand what actions will and will not be tolerated.

Read our Contributing Guide to learn about our development process, how to propose bugfixes and improvements, and how to build and test your changes to Open Source Education Bot.

We have a list of good first issues that contain bugs which have a relatively limited scope. This is a great place to get started, gain experience, and get familiar with our contribution process.

License

Open Source Education Bot is MIT licensed.

open-source-edu-bot's People

Contributors

0xhieu avatar elinguiuriel avatar vj-codes avatar bhanvimenghani avatar awinja-j avatar ashish11chawda avatar aboullaite avatar nitish-awasthi avatar prashanthpuneriya avatar agniutkarsh avatar emile-nsengimana avatar khaled-11 avatar srilals avatar prilcool avatar flovet-stack avatar cegard avatar ayanujju avatar walidaitlhaj avatar traore19 avatar oyamo avatar honorezemagho avatar avenger55 avatar aryangulati avatar powerexploit avatar amirtechnoide avatar stonefix avatar shah78677 avatar sailikhithk avatar ritiksoni00 avatar mohitacecode 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.