title: ReferenceError: request is not defined
body: <p>Im trying to replicate a <a href="https://developers.facebook.com/docs/messenger-platform/guides/quick-start" rel="noreferrer">facebook messenger bot</a> but keep getting <code>request is not defined</code>.</p>
  
  <p>Same code as facebook:</p>
  
  <pre><code>function callSendAPI(messageData) {
    request({
      uri: 'https://graph.facebook.com/v2.6/me/messages',
      qs: { access_token: PAGE_ACCESS_TOKEN },
      method: 'POST',
      json: messageData
  
    }, function (error, response, body) {
      if (!error &amp;&amp; response.statusCode == 200) {
        var recipientId = body.recipient_id;
        var messageId = body.message_id;
  
        console.log("Successfully sent generic message with id %s to recipient %s", 
          messageId, recipientId);
      } else {
        console.error("Unable to send message.");
        console.error(response);
        console.error(error);
      }
    });  
  }
  </code></pre>
  
  <p>My node <code>server.js</code> looks like this:</p>
  
  <pre><code>const express = require('express');
  const bodyParser = require('body-parser');
  //const request = express.request;
  const PAGE_ACCESS_TOKEN = 'abc';
  
  let app = express();
  
  app.use(bodyParser.urlencoded({ extended: false }));
  
  // parse application/json
  app.use(bodyParser.json());
  
  [...]
  
  function sendTextMessage(recipientId, messageText) {
    var messageData = {
      recipient: {
        id: recipientId
      },
      message: {
        text: messageText
      }
    };
  
    callSendAPI(messageData);
  }
  
  function callSendAPI(messageData) {..}
  
  [...]
  </code></pre>
  
  <p>Am I missing something with express? Thanks</p>