I created a facebook app. Then went to advanced settings and added an app page. Then went on created a webhook. It was successful. I selected page and subscribed to feed. Everything worked fine till here. But when I go to my page and post something on it Noting happens. I am not getting any request to my Server.
My Nodejs Code is this.
router.route('/v1/facebook/')
.get(function (req, res) {
if (
req.param('hub.mode') == 'subscribe' &&
req.param('hub.verify_token') == 'FBToken'
) {
res.send(req.param('hub.challenge'));
} else {
res.sendStatus(400);
}
});
router.route('/v1/facebook/')
.post(function (req, res) {
console.log('Facebook request body:');
console.log(JSON.stringify(req.body))
console.log('Facebook request body end:');
// Process the Facebook updates here
res.sendStatus(200);
});