title: Getting an error with Twitter lib
body: <p>In Google Apps Script I have this snippet of code in my project to send a tweet (<a href="https://jsbin.com/maxujacofe/edit?js,output" rel="nofollow">also in jsBin</a>):</p>
  
  <pre class="lang-js prettyprint-override"><code>function sendTweet(status) {
  
    var twitterKeys= {
      TWITTER_CONSUMER_KEY: "x",
      TWITTER_CONSUMER_SECRET: "x",
      TWITTER_ACCESS_TOKEN: "x",
      TWITTER_ACCESS_SECRET: "x"    
    };
  
    var props = PropertiesService.getScriptProperties();
  
    props.setProperties(twitterKeys);
    twit = new Twitter.OAuth(props);
  
    var service = new Twitter.OAuth(props);
  
  
    if ( service.hasAccess() ) {
  
      var response = twit.sendTweet(status);
  
      if (response) {
  
        Logger.log("Tweet ID " + response.id_str);
  
      } else {
  
        // Tweet could not be sent
        // Go to View -&gt; Logs to see the error message
  
      }
    }  
  }
  
  sendTweet("test");
  </code></pre>
  
  <p>But the problem I'm having is that I get this error: </p>
  
  <pre><code>TypeError: Cannot read property "text" from undefined. (line 293, file "twitter", project "Twitter lib")
  </code></pre>
  
  <p>Line 293 is from version 21 of the <a href="http://airhadoken.github.io/2015/06/29/twitter-lib-explained.html" rel="nofollow">"Twitter lib" library</a> (<a href="https://script.google.com/d/MKvHYYdYA4G5JJHj7hxIcoh8V4oX7X1M_/edit" rel="nofollow">MKvHYYdYA4G5JJHj7hxIcoh8V4oX7X1M_</a>).</p>
  
  <p>The message "test" actually gets tweeted, despite that error. Does anyone know how to fix it?</p>