Get expiration access_token - Javascript Date Operation

Javascript examples for Date Operation:Timestamp

Description

Get expiration access_token

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){// ww w .java 2s.c o  m
var exampleExpiration = 5181776 * 1000;//have to add milliseconds in
var now = new Date().getTime();
console.log(new Date(now + exampleExpiration));
    }

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials