message: Add upload and postApi  methods
diff: @@ -610,7 +610,40 @@ function Facebookbot(configuration) {
  }
  };
  - var attachment_upload_api = {};
  + var attachment_upload_api = {
  + upload: function(attachment) {
  + var message = {
  + attachment: attachment
  + };
  + facebook_botkit.api.attachment_upload.postAPI(message);
  + },
  + postAPI: function(message) {
  + request.post('https://' + api_host + '/v2.6/me/message_attachments?access_token=' + configuration.access_token,
  + {form: message},
  + function(err, res, body) {
  + if (err) {
  + facebook_botkit.log('Could not configure messenger profile');
  + } else {
  +
  + var results = null;
  + try {
  + results = JSON.parse(body);
  + } catch (err) {
  + facebook_botkit.log('ERROR in messenger profile API call: Could not parse JSON', err, body);
  + }
  +
  + if (results) {
  + if (results.error) {
  + facebook_botkit.log('ERROR in messenger profile API call: ', results.error.message);
  + } else {
  + facebook_botkit.debug('Successfully configured messenger profile', body);
  + }
  + }
  + }
  + });
  + }
  +
  + };
  facebook_botkit.api = {
  'messenger_profile': messenger_profile_api,
  