I am working in C#.Net, using SessionStateCredentials() and WebAuthorizer to use authentication across webpages.
I have authenticated the user successfully in the first page and want to access the same on the second page.
Can any body provide me a sample code to access credentials on second page to use in TwitterContext.
Is it something Like:
WebAuthorizer auth = new WebAuthorizer();
IOAuthCredentials credentials = new SessionStateCredentials();
var twitterCtx = new TwitterContext(auth1);
var followers = (from follower in twitterCtx.SocialGraph where follower.Type == SocialGraphType.Followers && follower.ScreenName == Convert.ToString(Session["ScreenName"]) select follower).SingleOrDefault();
In the above case, it is throwing error:
"Parameter name: You must provide a consumerKey."