Skip to content

Messenger Bot that, based on typed text, query spring documentation and return 3 first results

Notifications You must be signed in to change notification settings

karenworld/SpringBot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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: messages, messaging_postbacks, messaging_optins, message_deliveries, message_reads, message_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

About

Messenger Bot that, based on typed text, query spring documentation and return 3 first results

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%