Please install the following tools you need. For linux/mac os x users, it is recommended to install them by the package manager of your linux system. For windows users, you can link to following sites and install them by instruction.
- git https://git-scm.com/download/win
- python https://www.python.org/ftp/python/3.6.0/python-3.6.0a3-amd64.exe please remember to add python to enviroment path while installing.
- cloudfoundry-cli https://github.com/cloudfoundry/cli/releases
- Ensure that you have a Bluemix account. You can register for a 30 days free-trial.
- git clone https://github.com/WeijianL1/COMP523-Mr-Reese
- Create Facebook fan page and application
- Create an messenger app on facebook for developers website.
- Click 'Add Product' -> 'Messenger'.
- Generate fan page Token
-
In Bluemix, create a Conversation Service instance.
-
In Bluemix, create a Discovery Service instance.
-
In Bluemix, create a Natural Language Understanding instance
-
In Bluemix, create a ClearDB Managed MySQL instance
-
In Bluemix, create a Weather Company Data instance
- Creat a Workspace
- Click on "Launch Tool"
- Create two new collections (one for spreadsheet and another for news feed)
- Click into the spreadsheet collection
- Load data into this collection by clicking "Upload Documents"
-
Fill out the .env file.
-
In your terminal under the root directory of app.js:
cf login -a https://api.ng.bluemix.net
-
Type in your IBM username and keywords
-
Adjust manifest.yml
-
In terminal:
cf push
- Once the broker app is successfully executed in the cloud, go back to the Facebook developer page to set up the webhook.
- Callback URL: fill in the broker url (eg. https://yourname-broker.mybluemix.net/webhook)
- Verification Token: Any non-empty string
- Subscription Field:
- message_deliveries
- message_reads
- messages
- messaging_optins
- message_postbacks should be checked
- Select a page to subscribe your webhook to the page events