从facebook访问基本信息 [英] Accessing basic information from facebook

查看:101
本文介绍了从facebook访问基本信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我将使用Facebook登录名对我的应用程序进行身份验证,并且我想从facebook访问基本的用户信息.因此,我在aspx页面中创建了应用程序并编写了如下代码

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

推荐答案



http://help.hootsuite.com/entries/503826-allowing-访问网络中的基本信息 [ ^ ]

http://developers.facebook.com/docs/authentication
http://developers.facebook.com/blog/post/395/

http://codesamplez.com/programming/facebook-api-access-token-using- c-sharp [ ^ ]
Hi,

http://help.hootsuite.com/entries/503826-allowing-access-to-basic-information-in-networks[^]

http://developers.facebook.com/docs/authentication
http://developers.facebook.com/blog/post/395/

http://codesamplez.com/programming/facebook-api-access-token-using-c-sharp[^]


这篇关于从facebook访问基本信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆