It’ll register the same middleware with just one line, plus it’ll be a bit more secure since it’ll check incoming calls to the POST webhook for their integrity using your APP_SECRET.
Hope this helps! HyperDev is a pretty sick project.
Thanks for the suggestion @bruggie! I tried it in the example, but unfortunately, it didn’t work - no errors, there was just no longer a response to incoming messages.
But thanks for making messenger-bot - very handy to get going with Facebook bots quickly!
Oh, really? Darn, haha. I’ll look into using the middleware with Express. I only have tests with the vanilla http module, so there’s probably some little difference in implementation I need to make. Ideally the _verify and _handleMessage should only be for advanced cases. Thanks for letting me know!
@bruggie I think the facebook developer site might have changed since you wrote the instructions for the chatbot…
these instructions:
"‘My Apps’ drop-down. Select ‘website’ and enter a name for your new app. For the site URL, you can enter the publish URL of your project - that’s the URL in the tab that opens when you click ‘Show’."
@pleabargain - yes, they keep changing that section. I’ve updated the instructions in the messenger-bot readme - they now no longer ask you to specify the type of app until a later stage.