facebook-csharp-sdk / facebook-winclient-sdk

Facebook SDK for Windows & Windows Phone
http://facebooksdk.net
Apache License 2.0
61 stars 139 forks source link

LoginAsync always thinks cached token has expired #18

Closed PeteGoo closed 11 years ago

PeteGoo commented 11 years ago

In the following line, the comparison of

session.Expires > DateTime.UtcNow

should be

session.Expires < DateTime.UtcNow

https://github.com/facebook-csharp-sdk/facebook-winclient-sdk/blob/master/Source/Facebook.Client/FacebookSessionClient.cs#L102

This results in the browser window always being opened and closed even if the token has not expired.

f2bo commented 11 years ago

+1

We've seen this too.

@ntotten: It's fixed in our fork, but it's basically the fix mentioned above by PeteGoo.