message: Add FB get broadcast status
diff: @@ -1605,6 +1605,42 @@ function Facebookbot(configuration) {
  }
  }
  });
  + },
  + get_broadcast_status: function(broadcast_id, fields, 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;
  + }
  +
  + if (fields && fields.length > 0) {
  + uri += '&fields=' + fields.join(',');
  + }
  +
  + request({
  + method: 'GET',
  + json: true,
  + uri: uri
  + }, function(err, res, body) {
  + if (err) {
  + facebook_botkit.log('Could not get broadcast status');
  + if (cb) {
  + cb(err);
  + }
  + } else {
  + if (body.error) {
  + facebook_botkit.log('ERROR in getting broadcast status call : ', body.error.message);
  + if (cb) {
  + cb(body.error);
  + }
  + } else {
  + facebook_botkit.log('Successfully get broadcast status');
  + if (cb) {
  + cb(null, body);
  + }
  + }
  + }
  + });
  }
  };
  