isLongLived()
Closed this issue · 0 comments
Hello I am come from Taiwan so may be would write down the wrong English grammar.
Please forgive for any inconveniences caused.
I found an issue about access token function isLongLived()
When I login on web with dialog to get short-lived access token
I saw my access object -> expiresIn: 87662
I don't know why I got it more than 2 hours.
But I think it still is a short-lived token.
So when I call isLongLived() it would return true
/**
* Determines whether or not this is a long-lived token.
*
* @return bool
*/
public function isLongLived()
{
if ($this->expiresAt) {
return $this->expiresAt->getTimestamp() > time() + (60 * 60 * 2);
}
if ($this->isAppAccessToken()) {
return true;
}
return false;
}
I think it have to write other conditions to check it is long-lived access token or not.