-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"expires_at" bug? #17
Comments
Oh, as to the date formatting, looks like the problem is facebook returns the 'expires' as a total seconds timestamp, and the function being used accepts UNIX timestamps, and it doesn't look like it is being correctly converted over. |
Did you find any solution ? What is the response you get when you call For me $data variable only contains access_token in it. |
Yes it looks like a bug. |
You're right this is an issue that should be addressed. I fixed it in the official PHP SDK but forgot to back port it to FQB. The thing is that depending on the way you obtain the access token, sometimes it will return |
PS: Thanks for pointing out the issue @natenrb9! :) |
In the response I'm getting from extend() It is returning "expires_in" which is 5184000 - 60 days |
I am just starting out with the Facebook API, so I am definitely just in the learning phase. I did find what seems to be a bug:
AccessToken.php > extend()
$expires_at = isset($data['expires_at']) ? $data['expires_at'] : 0;
should be
$expires_at = isset($data['expires']) ? $data['expires'] : 0;
If you look at $data that "expires" is the actual name of the key.
But even after I changed this it is still not converting the date correctly for the $token.
It is showing the expires_at date as
public 'date' => string '1970-03-01 23:09:46.000000'
The text was updated successfully, but these errors were encountered: