chen-ye / hubot-fb

A Hubot adapter for the Facebook Messenger Platform
https://www.npmjs.com/package/hubot-fb
87 stars 21 forks source link

add auto webhook and subscription setup #4

Closed kengz closed 8 years ago

kengz commented 8 years ago

This solves #3

  1. Change the FB_ROUTE_URL default to /fb, good practice to name it by adapter to prevent name clash.
  2. auto webhook setup, and app subscription for page; update README accordingly. Effectively from now, one only needs to create the Page and App, then get the config varsl i.e. just Step 1 in Facebook's instruction. All the rest, from getting AppAccessToken, setup webhook, subscribe App to Page, are all done automatically. Test them out!
kengz commented 8 years ago

Update: add a message cleaner. Bot is tested: Can you publish the new version to npm and lemme know? Thanks :)

screen shot 2016-05-01 at 12 40 49 pm
chen-ye commented 8 years ago

hi! reviewing now. thanks for the PR!

chen-ye commented 8 years ago

Looks awesome, but can you separate the message cleaner into a separate PR and add an env var for configuring it? Can potentially break some modules that rely on custom robot.hear, such as https://github.com/opendns/hubot-zmachine/blob/master/src/zmachine.coffee#L247

kengz commented 8 years ago

Aight gotcha ^ the latest commit does not execute cleanMessage unless FB_AUTOHEAR is truthy.

chen-ye commented 8 years ago

prepping for integration at https://github.com/chen-ye/hubot-fb/commit/539b555d281fc1f73e733853b02465c7ab19dcc9

chen-ye commented 8 years ago

continued in https://github.com/chen-ye/hubot-fb/pull/5