Create Photo Album on Fan Page

Jul 14, 2010 at 6:12 PM
Edited Jul 14, 2010 at 6:14 PM
Hello, I am trying to create a photo album on a fan page, but end up receiving an error. When I try to create the album on the fan page, I make a call such as this: _api.Photos.CreateAlbum("Fan page photo album 1", "here", "this is a test!", fanPageId); Here is the error message I received: SocialHubCore.Channel.Impl.FacebookChannelTest.TestCreateAlbum: Facebook.Utility.FacebookException : A session key must be specified when request is signed with a session secret ------------------------- at Facebook.Utility.Utilities.ParseException(String response, Boolean JSONFormat) in <localdirectory>\Facebook\Utility\Utilities.cs:line 611 at Facebook.Rest.RestBase.processResponse(WebResponse webResponse) in <localdirectory>\Facebook\Rest\RestBase.cs:line 464 at Facebook.Rest.RestBase.SendRequestSynchronous(IDictionary`2 parameterDictionary, Boolean useSession) in <localdirectory>\Facebook\Rest\RestBase.cs:line 896 at Facebook.Rest.Photos.CreateAlbum(String name, String location, String description, Int64 uid, Boolean isAsync, CreateAlbumCallback callback, Object state) in <localdirectory>\Facebook\Rest\Photos.cs:line 753 at Facebook.Rest.Photos.CreateAlbum(String name, String location, String description, Int64 uid) in <localdirectory>\Facebook\Rest\Photos.cs:line 168 ... Posting to my user profile does work, with a call such as this: _api.Photos.CreateAlbum("test", "here", "my desc"); The error only appears when I attempt to create the album on my fan page. Any help would be much appreciated! -- Christine
Jul 14, 2010 at 7:39 PM
I figured it out so will post what I did to solve it help those in the future that come across a similar issue. My problem is that I am creating a DesktopSession which requires a session secret. In Rest > Photos.cs on approx Line 753 CreateAlbum(string name, string location, string description, long uid ,bool isAsync, CreateAlbumCallback callback, Object state) Instead of: return SendRequest<photos_createAlbum_response>(parameterList, uid <= 0); I modified the return to be as follows: var useSession = uid <= 0 || Session is DesktopSession; return SendRequest<photos_createAlbum_response>(parameterList, useSession); Which is the same way they solved http://facebooktoolkit.codeplex.com/Thread/View.aspx?ThreadId=70312