This is a messenger bot with KKBOX open API for searching songs, albums, playlist, artist data from KKBOX database You can use it for chat with "Innovation Chatbot" fans page on facebook
This project is runnable on Heroku!
$ cd /path/to/fb-chatbots
$ heroku create
# HEROKU_APPID is given to you from the above command. Run `heroku apps` to list them all.
$ heroku addons:create heroku-postgresql --app {HEROKU_APPID}
# URL_TO_HEROKU_APP is the URL given to you from the above command
$ heroku config:set APP_URL='https://{URL_TO_HEROKU_APP}'
you can choose one method to do
- go to facebook developer and sign in
- create a messanger app
- you need to choose at least message and messaging_postbacks events
- click webhooks
- click "edit subscription" button
- set callback url with heroku app url
- set verify token
you need to set
- ACCESS_TOKEN : fans page access token
- AUTHORIZATION : KKbox account authorization
- DATABASE_URL : your heroku postgres addon url
- VERIFY_TOKEN : what you set on verify token
- ADMIN_ID : administrator's conversation id
start chat with your fans page which set above on the messenger
請輸入"/歌曲名稱"
或輸入"#專輯名稱"
或輸入"$歌單名稱"
或輸入"@歌手名稱"
input ![WHAT_YOU_WANT_TO_BROADCAST]
for only conversation id is ADMIN_ID and only broadcast to conversation id is in database