FQL Query

Nov 7, 2007 at 6:20 PM

How do I execute an FQL query once the user is already logged in? My Default.aspx page has already gone through to authenticate and log in the user. Now, from another page, I would like to execute an FQL query to obtain some more pertinent information.

I'm pretty sure I cannot just do this:
FacebookService fb = new FacebookService();
string xmlString = fb.DirectFQLQuery(query);

Please help. Thanks!
Nov 7, 2007 at 8:02 PM
Each time you go to a new page, you need to set up the FacebookService again with your authentication information. You can find example code of how to do this in the FacebookWebSample in the Toolkit, in the Default.aspx.cs/Default.aspx.vb file.

Or better yet, you can use either a canvas base page or a canvas master page from the toolkit on each of your pages, and they will take care of the authentication for you. You can find information on how to do this in the Toolkit documentation, and there are examples of this in the AspNetPlatformSample.
Nov 7, 2007 at 9:25 PM
thanks jschuster for the quick reply.