The slack adapter has a convenient way of posting attachments using the robot emitter. I thought this might be nice for hubot-fb to have something similar for posting richer messages. Following this pattern, I added an event listener for fb.message, which requires a payload with an envelope field (corresponding to the response envelope) and the message, which could be an object with an attachment. I've updated the README with usage information.
The slack adapter has a convenient way of posting attachments using the robot emitter. I thought this might be nice for
hubot-fb
to have something similar for posting richer messages. Following this pattern, I added an event listener forfb.message
, which requires a payload with an envelope field (corresponding to the response envelope) and the message, which could be an object with an attachment. I've updated the README with usage information.Let me know what you think. Thanks!