Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the units of FB.getAuthResponse().expiresIn?

When I do this in the Facebook JavaScript API:

FB.getLoginStatus(function(response) {
    console.log(response.authResponse.expiresIn);
});

I get back an integer like 5184000.

When is that? What are the units? What's the epoch? It's clearly not in milliseconds since 1970. How do I convert that to a Date in JavaScript?

like image 587
Dan Fabulich Avatar asked May 28 '12 05:05

Dan Fabulich


1 Answers

It is the time of expiry in seconds. It is equivalent to 60 days.

In order to convert to a date read here.

like image 129
Yan Berk Avatar answered Sep 20 '22 14:09

Yan Berk