FacebookService.CreateSession(string authToken) exception

Jun 21, 2007 at 12:32 AM
I'm getting an "Invalid Parameter" exception from the FacebookService.CreateSession(string authToken) when I pass the string sent from Facebook in the "auth_token" variable. I've set both the api key and the facebook secret. Any ideas as to what could be doing wrong?
Jun 21, 2007 at 5:15 PM
Did you correctly set the IsDesktopApplication property?
Jun 21, 2007 at 6:58 PM
I believe so....this is a web app so I'm setting it to false:
_fbService.IsDesktopApplication = false;
Jun 21, 2007 at 11:50 PM
We discussed this in email. And the theory is that he needs to be setting the sessionkey and userid that he receives. Since he is a canvas page, he shouldn't need the CreateSession to ever fire.
Jun 27, 2007 at 6:41 PM
I am also receiving this error. I have IsDesktopApplication correctly set to false. However, my error is not on the canvas page, but on the add application callback, so the Session ID and User ID is not yet set, and I am not receiving those values from a form post. Any suggestions?
Jun 27, 2007 at 10:01 PM
Did you look at the samples source I posted yesterday.

I made a base page for each canvas type that resolves those issues. I don't think they are quite flawless yet. But, it will at a minimum show you how to handle the auth and add application logic.

There is a new CanvasIFrameBasePage and CanvasFBMLBasePage in the Facebook.WebControls project. (And a sample web project using each)