title: Get Twitter Access Token using Javascript
body: <p>Is there any way that we can get Twitter access token through JavaScript? It is for a MVC project.</p>
  
  <p>Here is what I got. It would be great if someone help me as most of the developer documents are really confusing.</p>
  
  <p>I have included the include the <code>widgets.js</code> script.</p>
  
  <pre><code>&lt;script&gt;window.twttr = (function(d, s, id) {
    var js, fjs = d.getElementsByTagName(s)[0],
      t = window.twttr || {};
    if (d.getElementById(id)) return t;
    js = d.createElement(s);
    js.id = id;
    js.src = "https://platform.twitter.com/widgets.js";
    fjs.parentNode.insertBefore(js, fjs);
  
    t._e = [];
    t.ready = function(f) {
      t._e.push(f);
    };
  
    return t;
  }(document, "script", "twitter-wjs"));&lt;/script&gt;
  </code></pre>