message: Add create message creative
diff: @@ -816,7 +816,43 @@ function Facebookbot(configuration) {
  });
  };
  - var broadcast_api = {};
  + var broadcast_api = {
  + create_message_creative: function(message, cb) {
  + var uri = 'https://' + api_host + '/' + api_version + '/me/message_creatives?access_token=' + configuration.access_token;
  +
  + var messageToBroadcast = {};
  +
  + if (typeof(message) == 'string') {
  + messageToBroadcast.text = message;
  + } else {
  + messageToBroadcast = message;
  + }
  +
  + var body = {
  + 'messages' : [messageToBroadcast]
  + };
  +
  + request({
  + method: 'POST',
  + json: true,
  + body: body,
  + uri: uri
  + }, function(err, res, body) {
  + if (err) {
  + facebook_botkit.log('Could not Create a broadcast message');
  + cb(err);
  + } else {
  + if (body.error) {
  + facebook_botkit.log('ERROR in creating a broadcast message call: ', body.error);
  + cb(body.error);
  + } else {
  + facebook_botkit.debug('Successfully create a broadcast message', body);
  + cb(null, body);
  + }
  + }
  + });
  + }
  + };
  facebook_botkit.api = {
  'user_profile': user_profile,
  