message: Add FB cancel scheduled
diff: @@ -1568,6 +1568,43 @@ function Facebookbot(configuration) {
  }
  }
  });
  + },
  + cancel_scheduled_broadcast: function(broadcast_id, cb) {
  + var uri = 'https://' + api_host + '/' + api_version + '/' + broadcast_id + '?access_token=' + configuration.access_token;
  +
  + if (facebook_botkit.config.require_appsecret_proof) {
  + uri += '&appsecret_proof=' + appsecret_proof;
  + }
  +
  + var body = {
  + 'operation': 'cancel'
  + };
  +
  + request({
  + method: 'POST',
  + json: true,
  + body: body,
  + uri: uri
  + }, function(err, res, body) {
  + if (err) {
  + facebook_botkit.log('Could not cancel scheduled broadcast');
  + if (cb) {
  + cb(err);
  + }
  + } else {
  + if (body.error) {
  + facebook_botkit.log('ERROR in cencel scheduled broadcast call : ', body.error);
  + if (cb) {
  + cb(body.error);
  + }
  + } else {
  + facebook_botkit.debug('Successfully cancel scheduled broadcast', body);
  + if (cb) {
  + cb(null, body);
  + }
  + }
  + }
  + });
  }
  };
  