Mar 24, 2010 at 7:36 PM

Environment: Windows 7, VS 2008 SP1, .NET 3.5, Toolkit 3.01, simple WPF 3.0 desktop application.

When a user first accesses the Facebook features in the desktop application, I ask for 2 extended permissions: publish_stream and offline_access.

I know I should be capturing and persisting the FacebookOfflineAccessSessionKey (or similar variable value) so the next time, I can execute something similar to the following

_facebookAPI.Session.SessionKey = FacebookOfflineAccessSessionKey;
_facebookAPI.Session.UserId = userid;

How specifically can I capture the offline access key? (It does not appear to be part of either the Session or Api objects...)

Mar 24, 2010 at 9:49 PM

I have a web app so I'm not sure how this will translate but, once the user has been authenticated and control is returned back to my page the session data is in the url so I capture it by checking Request["session"] and it is returned as a JSON string.  I use the Utility class to help read that into a Dictionary<string, string>.  You have to specify in the login url return_session = 1 so facebook knows to send this back.