Click here to Skip to main content
15,892,674 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I am going to authenticate my application with facebook login, and I want to access basic user information from facebook. So I created application and written code as follows in the aspx page

protected void Page_Load(object sender, EventArgs e)
        {
            String fbCode = Request.QueryString["Code"];
            String getAccessToken=String.Empty;
            
            if (fbCode != null)
            {
                WebRequest accessTokenRequest;
                accessTokenRequest = WebRequest.Create("https://graph.facebook.com/oauth/access_token?client_id=236762523037115&redirect_uri=http://localhost:6223/Default.aspx&client_secret=49735693f9801202a19b4854399c8103&code=" + fbCode + "");
                StreamReader accessTokenRequestStreem = new StreamReader(accessTokenRequest.GetResponse().GetResponseStream());
                String webrequestResponse = accessTokenRequestStreem.ReadToEnd();
                getAccessToken = webrequestResponse.Substring(13, webrequestResponse.Length- 13);
                
                
            }

        }


So I got access token, So now how can I get the user information

Pls help me
Posted
Updated 19-Sep-11 20:21pm
v2

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900