views:

191

answers:

2

I am a ASP.NET developer using Facebook Developer Toolkit to develop a facebook flash application with flash developer.
When the user plays the game for a certain period of time, there are chances that the facebook session expires and I can't call any Facebook API for processing as a result.

What should I do for this problem?

+1  A: 

AFAIK, Facebook uses sliding expiration for the session ticket. As such, you could ensure that the FB session does not expire, by making regular requests to FB. For example, you could ask FB for the latest user status message every five minutes.

Update: Link to the Facebook dev docs on the session keys.

Franci Penov
Thanks. Do you have any Facebook references for the sliding expiration?
Billy
From the Facebook Dev docs on session keys.
Franci Penov
A: 

Assuming there's a parent FBML page hosting the flash, I would try putting something in that keeps on simulating some user interaction with Facebook. E.g. a 1x1 pixel fb:iframe with a 5 refresh triggered by some FBJS. (I believe setLocation() should work on an iframe.) I think the interaction will need to come from the user's browser rather than being an API call for the session expiry time to be refreshed, probably due to cookies.

Karl B