If file is being Denied to open then use chmod +x filename in Linux or MacOS. For Windows, run Command Prompt as administrator.

Config Environment Properties

Properties must be configured before the app can be accessed:

facebook.verify.token # You have to decide. This value has to be the same for both the app and Facebook.
facebook.access.token # This is used to send pi hits to Facebook on your behalf.
http.port # This is 8080 by default.
http.address # This is 0.0.0.0 by default.

One method of setting the properties is by the command: -D<prop-name>=<prop-val>.

When creating a project of your own, you'll need to borrow from the Procfile in the root directory of this project, and the MAVEN_CUSTOM_OPTS will only be necessary if your app is not the primary module of your Maven project.

Video Demonstration

A Video Demonstration is uploaded to Youtube which can help to setup Facebook Echo Bot on any cloud.

Running the App

Accessing the app

The app's web hook is at <host>:<port>/webhook.
For Heroku-deployed apps, it is at <app-name>.herokuapp.com/webhook.

Setting up your Facebook app

Refer the following link to set up your Facebook app:
https://developers.facebook.com/docs/messenger-platform/getting-started/app-setup

Making contributions

The first thing to do is create an account on GitHub (if you do not have one yet). You should then read the rules of participation in the development for the project you selected. These rules are usually found in a file called CONTRIBUTING.md in the root of the repository. This repository does not have it yet.

Usually, there are several ways to participate in the development of a project. The main ones are to send a message about some error or desired improvement (Submitting Issue), or directly creating a Pull Request with your correction or improvement (Code Contributing). You can also participate in the improvement of documentation, answers to questions that have arisen from other developers, and much more.

Forking the project

Make your way to the project page and click on the button that says Fork. This command will create your own copy of the project's repository in your github account.

After forking thr git, the next thing you need to do is to clone (ie. copy or download) the repository onto your local machine, this can be done by:

$ cd~/work/git #folder in which there will be a code
$ git clone https://github.com/[YOUR-USERNAME]/facebook-echo-bot.git #clone repository

Configuring Git

Next, you need to make a small adjustment to your Git, so that when you send commits, your name will be displayed.
For this it is enough to execute these commands:

Setting git remotes

Next, you will need to link remote repositories to git, remote repositories are nothing but versions of your project that are hosted on the internet or network somewhere (in this case, the jboss-outreach main repository). You can add this by setting the upstream (preferably) in your git local repository. This can be done by:

Sending a pull request

While you were working on the code, other changes could be made to the main branch of the project. Therefore, before submitting your changes, you need to fetch the new changes and rebase your branch.
This is done like this:

The next step is to add and then commit your change, this can be done by:

Adding changes:

git status # This will list all the edited files
git add filename.extension #To add individual files OR
git add .# To add all the files at once

Commiting the changes:

git commit -m"Enter your commit message here"

The commit message should be very brief but at the same time informative. Use your words wisely!

Now you can send your changes.

$ git push origin <your-name-branch>

After that, we go to your project clone repository, in which you participate and click the button "New Pull Request".
And we see the following form:

On the left, you must select the branch in which you want to push the changes (this is usually the master, well, in general, this is the branch you rebase to) and on the right is a branch with your changes.

Next, you will see a message from GitHub whether it is possible to automatically merge the changes or not. In most cases, you will get a success message which says "Able to merge."

If there are conflicts, you will most likely need to review your changes.

Then click on - Create Pull Request.
When filling out the name and description of your Pull Request it is considered good practice to specify the Issue number for which your Pull Request is created.
After creating the Pull Request, it will run the tests, perhaps some tools for metrics and so on. The results of his work you will see in your Pull Request as shown below:

Remmber to describe your changes/feature in detail in the pull request message.

In case the tests are not passed or the build is not compiled, you will see a red error message and by clicking the Details link you will see what is wrong. In most cases, you will need to fix your Pull Request so that all checks are successful.

Amending your pull request

If everything is good with your pull request, then soon it will be merged by a project collaborator.
However, it is more likely that a reviewer asks for some changes to be made to your pull request.
To do so, simply return to step 6 and after making the changes and commit we perform the following commands: