title: Migrating from twitter anywhere api
body: <p>I m using twitter anywhere api for allowing user to sign in with twitter and get their twitter data to store it my table.Since twitter anywhere api is going to expire soon how can i migrate this functionality to oauth.</p>
  
  <p>my javascript:</p>
  
  <pre><code>&lt;script src="https://platform.twitter.com/anywhere.js?id={{twitterappid}}&amp;v=1"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  var twt_connected = 0;
  var Uuid = '2334443224';
  $(function(){
  if ($('#twtlogin').length) {
    // do something
  twttr.anywhere(function(twitter) {
  if(twitter.isConnected()){
  //alert('Welcome, you are connected');
  currentUser = twitter.currentUser;
  screenName = currentUser.data('screen_name');
  jQuery.ajax({url:"/twitter/Uuid="+Uuid+"/" ,
               type: "POST",
               data: {user: JSON.stringify(currentUser) },
               dataType: "json",
               success: function(result) {
                          }});
  document.getElementById("twtlogin").innerHTML = '&lt;img src="/images/icon_tconnected.gif" width="153" height="37" alt="Connected" /&gt;';
   }
   });
   }
   });
  
  $("#login").click(function(e){
      e.preventDefault();
      if (twt_connected == 0){
      $.post("/twt-click-time/Uuid="+Uuid+"/","clicked",function(data){})
      twttr.anywhere(function (T) {
               T.bind("authComplete", function (e, user) {
              document.getElementById("twtlogin").innerHTML = '&lt;img src="/images/icon_tconnected.gif" width="153" height="37" alt="Connected" /&gt;';
               twt_connected = 1;
               currentUser = T.currentUser;
               screenName = currentUser.data('screen_name');
               jQuery.ajax({url:"/twitter/Uuid="+Uuid+"/" ,
                           type: "POST",
                           data: {user: JSON.stringify(currentUser) },
                           dataType: "json",
                           success: function(result) {
                          }});
  
               });
               T.signIn();
               });
               }
               });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>I m using django at my backend.</p>