We implement here a Facebook Messenger Bot using the Messenger platform.
Installing the FBBot framework and sample
In this section we describe the steps to follow to install the S8 (framework and sample)files in a fresh desktop computer.
The steps to create and configure the messenger bot and accounts in Facebook are described in Facebook pages, see [fbot8] Installing the messenger.
Requirements
It is required to host the FBBot to run a server side (node.js) application with S8. Ensure you have already
Copy the default snapshot file (n8.snapshot.js) in Node platform to the folder where it is the app.js file in a fresh Facebook Messenger Bot application. Read more...
Download the FBBot.st file in the folder where it is the app.js file
FileIn the FBBot framework Evaluating in a (remote) workspace: 'FBBot.st' fileContents fileIn You should see in the console of the server that the framework is compiled.
Now you can save the image evaluating: 'function print(text) { return console.log(text); }',Snapshot contents outputToFile: 'n8.snapshot.js'
Now your server includes the FBBot implementation and sample