기타(framework)
2018.06.29 / 21:17

java spring chatbot - 자바 스프링 챗봇 오픈 소스

aichatbot
추천 수 40

SpringBot

Messenger Bot that, based on typed text, query spring documentation and return 3 first results. Read this blog post for more details: https://aboullaite.me/my-first-java-bot/

Run the App

First thing you need to do is to setup a Facebook app, Please follow this link for more details. You'll need also a free hosting service like Heroko or Clever Cloud, or you can simply use NGROK. and don't forget to create a Facebook page.

Once all done, follow this steps:

  • open https://developers.facebook.com/apps click the 'Add a New App' button
  • enter the Display Name, e.g. spring-bot select the Category: 'Apps for Messenger'
  • click the 'Create App ID' button
  • Section 'Token Generation': Select your created FB Page
  • copy the 'Page Access Token' to the clipboard
  • copy it to your application.yml
  • navigate to 'Dashboard'
  • copy the 'App Secret' to the clipboard
  • copy it to your application.yml
  • use a randomly generated string as 'Verify Token'
  • deploy you app, and copy your public HTTPS URL (callback url)
  • navigate back to 'Messenger'
  • Section 'Webhooks': Click the 'Setup Webhooks' button
  • past the Callback URL and your verify token
  • select the following Subscription Fields: messagesmessaging_postbacksmessaging_optinsmessage_deliveriesmessage_readsmessage_echoes
  • click the 'Verify and Save' button
  • Section 'Webhooks': Select your created FB Page to subscribe your webhook to the page events
  • click the 'Subscribe' button