Session Key Problem...

Jun 4, 2009 at 10:13 PM

I am just getting started working on a desktop Facebook application using the Facebook Developer Toolkit and Microsoft Visual C# 2008. I have an API and a Secret Key and have entered and have tried to find a solution to this problem but I can't find one. It says my "FacebookException unhandled: session key invalid or no longer valid" and I don't know what to do. I am new to developing with this toolkit.

Here's the code that it highlighted:

 friendList1.Friends = facebookService1.friends.getUserObjects();

Can someone please help me here. Thanks -- BrettB87

Developer
Aug 1, 2009 at 1:47 AM

You need to verify whether the session key is valid or not. Have a look at http://my6solutions.com/post/2009/07/31/Facebook-Connect-Invalid-Session-Key-issue.aspx. I have included the utility class that I use.