fetching a new session key after infinite key is invalidated

Jul 28, 2009 at 5:58 PM

Hi, I have a problem regarding session keys.

If the facebook.API object is currently using an infinite session key generated from the offline access permission prompt, and then the user

goes to the edit apps page in facebook settings and revokes offline access permission, this invalidates the session key and obviously

gives me an error if I try to make calls using the facebook.API object. My website then ceases to function until i clear my cookies. I'm thinking

that the solution is to somehow check if a session key is expired and if it is, generate a new key if the user is still logged into facebook. How can I do this?