Could you please implement an "expiry time" property?

Jul 14, 2008 at 6:44 PM
It would be really helpful if the FacebookService could tell you the expiry time for the user's session key.  This will become increasingly important as Facebook does away with infinite session keys.  Right now, the FacebookService will tell you if the session key expires, but it won't tell you when it expires.

While we're at it - what's the current behavior for when you try to instantiate the Facebook service with an expired session key?  In other words, say my application contains this block of code :

                newFacebookService = new FacebookService();

                newFacebookService.ApplicationKey = ApplicationAppSettings.CurrentApiKey_Facebook;
                newFacebookService.Secret = ApplicationAppSettings.CurrentSecret_Facebook;
                newFacebookService.IsDesktopApplication = false;
                newFacebookService.SessionKey = sessionKey_facebook;
                newFacebookService.UserId = userId_facebook;

What happens if sessionKey_facebook has expired?  Does FacebookService throw an exception?

Thanks for the help.
Jul 14, 2008 at 7:00 PM
I might have understood you wronge.

If the user is still using the app, the session never expires and it will be renewed.

Jul 14, 2008 at 7:03 PM
Yes, but what if the user lets the page sit in his browser for, say, two hours?  By the time they get back, the session will have expired. 
Jul 14, 2008 at 11:42 PM
Ok cool.

I think, if the session expires, the page will refresh automatically with the same URL. and so, the application will start and require new session.


:)


Jul 15, 2008 at 7:29 PM
Well, I doubt that the page will refresh automatically.  How would it, unless you're trapping the Session_OnEnd() event in Global.asax?

(I should mention that I'm developing an IFrame app, and using my own page classes.)

What I'm wanting to do is this -

User opened my app in their browser and used it for a while.
Then they left it alone for a while and the session died.
They press a button on my app, hoping to interact with it.
Upon postback, I check to see if their session has expired - if it has, I display a message to that effect.


midowazzan wrote:
Ok cool.

I think, if the session expires, the page will refresh automatically with the same URL. and so, the application will start and require new session.


:)





Jul 16, 2008 at 12:45 AM
Got you!

Well, you can implement the session check by yourself. I doubt that the toolkit will support that.

You may edit or use some of the toolkit functions.

If I were you, I would remove all "internal" keywords from the toolkit functions so I can use them from inside the application and execute API calls.