kennylerma / facebook-actionscript-api

Automatically exported from code.google.com/p/facebook-actionscript-api
0 stars 0 forks source link

FacebookAuthResponse expireDate is wrong #351

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Initialize Facebook with oauth=true
2. Retrieve the authResponse object

What is the expected output? What do you see instead?
The authResponse.expireDate should be a date like one hour from now. Instead 
it's equals to the current time.

What version of the product are you using? On what operating system?
1.7

Fix:
FacebookAuthResponse.as line 81:
Replace:
expireDate.setTime(expireDate.time + result.expiresIn);

by:
expireDate.setTime(expireDate.time + result.expiresIn*1000);

This should get a better estimation of the expire date.
(I still wonder why Facebook does not specify it using an absolute date instead 
of this "seconds from now"...)

Original issue reported on code.google.com by alexis.h...@gmail.com on 8 Sep 2011 at 11:30

GoogleCodeExporter commented 9 years ago
Good catch, thanks for the heads up! The fix will be added to the svn repo and 
be included in the next version

Original comment by edwar...@gmail.com on 15 Sep 2011 at 8:36

GoogleCodeExporter commented 9 years ago
added to 1.8

Original comment by edwar...@gmail.com on 6 Oct 2011 at 3:49