Problem with Session

Oct 16, 2007 at 9:34 AM
I debuged my code and after creating a session and logging in everything is fine. But once i try to call GetPhotoAlbums(), the session dies. Am I doing something wrong with my coding?

string sessionKey = HelperFunctions.GetCookieValue(Constants.FACEBOOKAUTHTOKEN);
string authToken = HelperFunctions.GetCookieValue(Constants.FACEBOOKSESSIONKEY);
string userID = HelperFunctions.GetCookieValue(Constants.FACEBOOKUserIDCOOKIE_NAME);
string sessionExpires = HelperFunctions.GetCookieValue(Constants.FACEBOOKSESSIONEXPRS);

Facebook.Components.FacebookService _fbService = new Facebook.Components.FacebookService();
_fbService.SessionKey = sessionKey;
_fbService.UserId = userID;
fbService.ApplicationKey = Constants.FACEBOOKAPI_KEY;
fbService.Secret = Constants.FACEBOOKSECRET_KEY;
_fbService.IsDesktopApplication = false;
_fbService.CreateSession(authToken);

jayrockJ.JsonWriter jsonWriter = new jayrockJ.JsonTextWriter();
jsonWriter.WriteStartObject(); //Should be first
jsonWriter.WriteMember(Constants.PICTURES_SITENAME);
jsonWriter.WriteString(Constants.FACEBOOKSITENAME);
jsonWriter.WriteMember(Constants.PICTURES_PHOTOSINFO);
jsonWriter.WriteStartArray();
System.Collections.ObjectModel.Collection<Facebook.Entity.Album> photoSets = _fbService.GetPhotoAlbums();

This dies at the very last line.

Any help is appreciated, Thanks!