Select the page you have created and get the Page Acess Token:
Click Deploy Button in our gitrepos README.md
Set the WIT_TOKEN, FB_PAGE_TOKEN, and FB_VERIFY_TOKEN.
Make sure it's sucess and view the app:
You may see something like this from https://{yourspecificedname}.herokuapp.com/:
""Only those who will risk going too far can possibly find out how far one can go." - T.S. Eliot"
Final step is put this server name in the facebok app page. From https://developers.facebook.com/apps/, select your app and messenger. You will see Webhooks:
Select "Setup Webhooks", and you will see callback URL and verify token. For the callback URL put your herokuapp URL + "/webhook". For example, my callback URL is https://fbwitbot.herokuapp.com/webhook.
Type the Verify Token
that you set. If you haven't set, the default value is "just_do_it".
Add a new app:![image](https://cloud.githubusercontent.com/assets/901975/14749884/91404432-08f4-11e6-9b75-05b0c1994a91.png)
Select WWW platform:![image](https://cloud.githubusercontent.com/assets/901975/14749894/a2b1be6c-08f4-11e6-95c8-981afbef4fe1.png)
Name it and click "Create New Facebook App ID":![image](https://cloud.githubusercontent.com/assets/901975/14749905/b557bf80-08f4-11e6-8218-2dd8dc7d529c.png)
Add email and select category:![image](https://cloud.githubusercontent.com/assets/901975/14749960/ef969b94-08f4-11e6-9fa6-3294a47fcf4e.png)
Add website (any website is OK):
From https://developers.facebook.com/apps/, select the created app:
Select Messenger and get statred:![image](https://cloud.githubusercontent.com/assets/901975/14750051/6733be3e-08f5-11e6-9da7-a35eb2720298.png)
Select the page you have created and get the Page Acess Token:![image](https://cloud.githubusercontent.com/assets/901975/14750082/892b295a-08f5-11e6-925a-812c43da654d.png)
Click Deploy Button in our gitrepos README.md
Set the WIT_TOKEN, FB_PAGE_TOKEN, and FB_VERIFY_TOKEN.![image](https://cloud.githubusercontent.com/assets/901975/14750245/627a5d20-08f6-11e6-9672-f19b3719eb2b.png)
Make sure it's sucess and view the app:![image](https://cloud.githubusercontent.com/assets/901975/14750332/d59fad46-08f6-11e6-9f24-16fff6b98898.png)
You may see something like this from https://{yourspecificedname}.herokuapp.com/: ""Only those who will risk going too far can possibly find out how far one can go." - T.S. Eliot"
Final step is put this server name in the facebok app page. From https://developers.facebook.com/apps/, select your app and messenger. You will see Webhooks:
Select "Setup Webhooks", and you will see callback URL and verify token. For the callback URL put your herokuapp URL + "/webhook". For example, my callback URL is https://fbwitbot.herokuapp.com/webhook.
Type the Verify Token that you set. If you haven't set, the default value is "just_do_it".
Click all items in the Subscription Fields.
Then, you will see green complete!![image](https://cloud.githubusercontent.com/assets/901975/14750734/e59c1016-08f8-11e6-9333-fbb7c92dd342.png)
You may need to select the page one more time:
curl -X POST "https://graph.facebook.com/v2.6/me/subscribed_apps?access_token="
You may see: {"success":true}
Finally, go to the Facebook page, you created/selected and send a message there:![image](https://cloud.githubusercontent.com/assets/901975/14750786/20ddf0a4-08f9-11e6-9c9c-719d1020e5d8.png)