In Slack2Watson(1) and (2) I created a chatbot and integrated it into Slack Slash Commands. Now, let’s integrate the same chatbot into Facebook Messenger. To accomplish this I need to create a Facebook Application, add the Messenger Platform to my Facebook Application, create a Webhook, have admin access to a Facebook Page to generate a Page Access Token so I can send and receive messages send to the Facebook Page, and create the Node-RED flows to integrate the Facebook Messenger with the IBM Watson Conversation.
Create a Flow to Verify the Request for Webhook Edits in Node-RED,
Create an Endpoint for the Redirect URL of the Webhook in Node-RED,
Create a Facebook Application for the Messenger Platform,
Enable Webhooks Integration with Node-RED,
Create a Flow to Verify the Request for Webhook Edits in Node-RED
To prepare the setup and configuration of the Facebook Application, the Messenger platform and Webhooks to enable a chatbot in Facebook Messenger, I will first create the Node-RED flows to implement the required server workflow.
The first flow is to verify the endpoint for the setup of the Facebook Application, using the ‘hub.challenge’ token.
Go to your Node-RED application on Bluemix at http://<username>-nodered-slackapp.mybluemix.net/,
Click the ‘Go to your Node-RED flow editor’ button,
If you’re not logged in yet, log in now,
Add a new flow tab and rename the flow ‘Facebook Messenger’,
To verify your endpoint during setup of your Webhook, or when you update an existing topic subscription of your Webhook, Facebook sends a GET request. The request will include: hub.mode=subscribe
hub.challenge â€” a random string
Erik Larson, The Devil in the White City (2004) 390p.
I have read ‘The Devil in the White City’ as a trilogy, together with ‘Nature’s Metropolis‘ and ‘The Jungle’, and the overlap and synergies between the three works is so insightful to understand the roots of modern America, which sprouted in the Gilded Age of Chicago. Americans in general have perhaps a short memory and a shallow desire to understand their history or present, as they are so energetically working to build their future, but as they strive thus forward, they fail to see the straight trail they leave behind. The history of Chicago is interestingly also transcending the contemporary spleen of American culture. ‘Nature’s Metropolis’ more than any other work perhaps, gives a more comprehensive insight into the shared destiny of the northern East Coast and the Great West and South. The history of Chicago is the stitching between the common descent, by opening the gap between the White City and the Black City, between the amazing wonders and creative forces of the American Dream on one hand and the devastating destruction and humiliation of the American Psyche on the other, by describing a meticulous history of the ‘World’s Columbian Exposition‘ of 1893 and a portrait of America’s first serial killer H.H. Holmes.
‘Slack2Watson (1): Connect API Connect to Serverless OpenWhisk’ is part 1 of an application called Slack2Watson, which integrates a ChatBot into Slack and allows you to retrieve information about events via Slash Commands in Slack. In part 1, I will set up the ‘API Connect’ service and link the APIs in ‘API Connect’ to the OpenWhisk functions.
Integration is managed using API management in ‘API Connect,’ serverless or event-based APIs in OpenWhisk, and IBM Watson to create the Conversation bot. Some data is retrieved via Google Sheets API.
Yu Hua “once heard an American folk song entitled ‘Old Black Joe,’ a song about an elderly black slave who experienced a life’s worth of hardships, including the passing of his entire family, yet he still looked upon the world with eyes of kindness, offering not the slightest complaint.” Hearing the folk song ‘Old Black Joe’ became the inspiration for ‘To Live’, in which an elderly Chinese man, Fugui, has passed a life of hardship including losing his entire family. Central to the story is also a wisdom by the grandfather of Fugui: the chicken becomes a goose, the goose becomes a lamb, the lamb grows up to become a sheep, the sheep becomes an ox. After the ox, there is communism.
It is really hard to read the book and determine if it is about the indestructible hope of man or if it is about the inevitable suffering of man. One certainty exists, life is beckoning death. “As the black night descended from the heavens, I knew that in the blink of an eye I would witness the death of the sunset. I saw the exposed and firm chest of the vast earth; its pose was one of calling, of beckoning. And just as a mother beckons her children, so the earth beckoned the coming of night.” One of the saddest books ever written, and yet anyone will find a moment of happiness. “In the end, it turned out all for the best.”
Too often, I hear the claim by populists that Islam is a Trojan Horse in Western society, that the Islam is an enemy to Western values. The theory of a fundamental clash of cultures between Judeo-Christianity and Islam is the very pillar of Islamophobic popularism today. This co-called Straussâ€“Howe generational theory comes from amateur historians and populist authors William Strauss and Neil Howe from the US, who both see a war between Islam and the West as the ‘fourth turning.’ I studied history and am an amateur historian myself, but I believe in facts rather than ‘alternative facts’, in truths rather than convictions.
The true foundation of Modernist Western ethics and current social values however is not religion but happiness. As a humanist, I believe that the pursuit of happiness is what drives man. Man advances through learning. Happiness, Epicurus says, is the absence of physical and mental suffering. Happiness is ensured in Freedom and Democracy, which are the legal form of this pursuit. This pursuit of happiness requires, according to Lucretius, the seeking of truth. It is science, not religion, that is the foundation of the pursuit of happiness, and therefor the true foundation of Western modernist culture.
With the rise of populism claiming to be the true defenders of our Western values, it seems that we Western humanists of the 21st century do not know whom to fight. The left is easily cornered by the right to be defenders of Islam, and out of instinct too easily accepts this role. But humanists should understand that the anti-Islamic populists are not worse but equal enemies as is Islam. The left has become complacent and overconfident in its fight against religion.
When I grew up however, it was not Judaism or Christianity that shaped my thinking and my values, but a series of Western thinkers whose works radically opposed Judeo-Christian culture. Western modernist culture instead of being Judeo-Christian or welcome to Islam, is instead radically anti-religious. Continue reading →
Without a doubt, one of the best books you can read to understand America in general, and Chicago and the Great West specifically. For a little more comprehensive review see the post about ‘The Devil in the White City‘.
Login to Bluemix, in a separate tab login to Github,
In Bluemix open Catalog->Boilerplates and create a ‘Node.js Cloudant DB Web Starter’ Boilerplate, named ‘<username>-nodejs-app1’, click CREATE
Go to ‘Overview’, scroll down to ‘Continuous delivery’ and click ‘Enable’
In the ‘Toolchain Settings’, change the name of the Toolchain to ‘<username>-nodejs-app1’, and click Create,
If the Github THINK or CODE icon displays a configuration error, from the block’s dropdown icon in the topright, click the ‘Configure’ link to correct the configuration of your Github account,
Go to your Github account and make sure that the repository for the new Bluemix app is created successfully,
Copy the Git URL, on localhost open a commandline terminal, change to your development directory and clone the new repository, cd ~/dev/src/bluemix
git clone https://github.com/remkohdev/remkohdev-nodejs-app1.git
Open the project directory in your favorite editor,
Open the ‘package.json’ file and change the ‘name’ property to ‘<username>-nodejs-app1’,
From the commandline, in your project directory, git status
git add .
commit -m "change package.json name property"