When you reference the API, You’ll need to make a small change to the script tag, (depending on how you want to use the API). you should follow the example if you have a look at option 2.
You’ll see this example opens the messenger then sends a message. Hey! for instance.
…
// Wait until the messenger is fully
// ready, then send a message
FxoMessenger.on(‘stateChanged’, function(state) {
if (state === ‘connected’) {
FxoMessenger.sendMessage(‘Hey!’);
}
});
// Subscribe to all messages received,
// logging them to the console
FxoMessenger.on(‘messageReceived’, function(message) {
console.log(message);
});
you can then adjust your message accordingly
Sarah