I am using Facebook C# SDK V6 and am using this tutorial.
http://csharpsdk.org/docs/web/getting-started
I have got nearly everything working – however every time I try to assign my Access Token to my context.Session[“AccessToken”] I receive a null exception.
Here is the bit of code:
public void ProcessRequest(HttpContext context)
{
var accessToken = context.Request["accessToken"];
context.Session["AccessToken"] = accessToken;
context.Response.Redirect("/Facebook.aspx");
}
It errors on line 2 – during debug I can see the Session is null as it comes into the handler.
I am using webforms for this example.
Any help would be great.
Owen
The docs have now been updated with the fix.
inherit from
IRequiresSessionStateso you can access the session.