简体   繁体   English

Facebook C#SDk用户注册

[英]Facebook C# SDk user registration

I am trying to implement user registration on my mvc3 site using fb. 我正在尝试使用fb在我的mvc3网站上实现用户注册。 My question is regard this bit of code 我的问题是关于这段代码

    FacebookClient fbClient = new FacebookClient(accessToken);
    dynamic me = fbClient.Get("me?fields=id,name");

What other parameters can be specified in the request "me?fields=id,name,??". 可以在请求“ me?fields = id,name,??”中指定其他哪些参数。 My application requires Email Address, phone number, address and name (first name, last name). 我的应用程序需要电子邮件地址,电话号码,地址和姓名(名字,姓氏)。 I would be grateful if someone could tell me or better yet point to to somewhere I can find documentation on this. 如果有人可以告诉我或者更好地指向我可以找到有关此文档的地方,我将不胜感激。

This is a sample of the parameters you get inside dynamic me = fb.Get("me") without user permission: 这是未经用户许可而在动态me = fb.Get(“ me”)中获得的参数的示例:

" id ":"894555532" id ”:“ 894555532”
" name ":"John Doe" name ”:“ John Doe”
" first_name ":"John" first_name ”:“约翰”
" last_name ":"Doe" last_name ”:“ Doe”
" link ":"http://www.facebook.com/johndoe" 链接 ”:“ http://www.facebook.com/johndoe”
" username ":"john" 用户名 ”:“ john”
" bio ":"Sample bio" bio ”:“样本bio”
" quotes ":"\\"Sample quote"" 引号 ”:“ \\”样本引号“”
" work ":[{" employer ":{" id ":"39233323343"," name ":"Sample Company"} 工作 ”:[{“ 雇主 ”:{“ id ”:“ 39233323343”,“ 名称 ”:“样品公司”}
" position ":{" id ":"142461033332450"," name ":"Backend Developer"} position ”:{“ id ”:“ 142461033332450”,“ name ”:“后端开发人员”}
" projects ":[{" id ":"214103971985333" " name ":"Coors Light, Sample Project"}]}] 项目 ”:[{“ id ”:“ 214103971985333”“ 名称 ”:“ Coors Light,示例项目”}]}}]]
" favorite_teams ":[{" id ":"171522852874952"," name ":"Juventus"},{" id ":"112325268793829"," name ":"Barcelona FC"}] favorite_teams ”:[{“ id ”:“ 171522852874952”,“ 名称 ”:“尤文图斯”},{“ id ”:“ 112325268793829”,“ 名称 ”:“巴塞罗那FC”}
" favorite_athletes ":[{" id ":"326971266226"," name ":"Alessandro Del Piero"}] favorite_athletes ”:[{“ id ”:“ 326971266226”,“ 名称 ”:“ Alessandro Del Piero”}
" gender ":"male" 性别 ”:“男性”
" timezone ":-6 时区 ”:-6
" locale ":"en_US" locale ”:“ en_US”
" verified ":true 已验证 ”:true
" updated_time ""2012-01-24T09:12:17+0000"} updated_time ”“ 2012-01-24T09:12:17 + 0000”}

" email " requires user permission 电子邮件 ”需要用户许可

I'm sure there are other things you can get, though there is no official list for c# sdk yet. 我确定您还能得到其他东西,尽管目前尚无C#SDK的官方清单。

This is a sample of how to get all that info: 这是如何获取所有信息的示例:

var fb = new FacebookWebClient();
dynamic me = fb.Get("me");

imgProfilePic.ImageUrl = string.Format("https://graph.facebook.com/{0}/picture", me.id);
lblName.Text = me.name;
lblFirstName.Text = me.first_name;
lblLastName.Text = me.last_name;

Here's an updated / complete list a scopes for Facebook C# SDK: 这是Facebook C#SDK范围的更新/完整列表:

ads_management
create_event 
create_note 
email 
export_stream 
friends_about_me 
friends_activities 
friends_birthday 
friends_checkins 
friends_education_history 
friends_events 
friends_games_activity 
friends_groups 
friends_hometown 
friends_interests 
friends_likes 
friends_location 
friends_location_posts 
friends_notes 
friends_online_presence 
friends_photo_video_tags 
friends_photos 
friends_questions 
friends_relationship_details 
friends_relationships 
friends_religion_politics 
friends_status 
friends_subscriptions 
friends_videos 
friends_website 
friends_work_history 
manage_friendlists 
manage_notifications 
manage_pages 
offline_access 
photo_upload 
publish_actions 
publish_checkins 
publish_stream 
read_friendlists 
read_insights 
read_mailbox 
read_requests 
read_stream 
rsvp_event 
share_item 
sms 
status_update 
user_about_me 
user_activities 
user_birthday 
user_checkins 
user_education_history 
user_events 
user_games_activity 
user_groups 
user_hometown 
user_interests 
user_likes 
user_location 
user_location_posts 
user_notes 
user_online_presence 
user_photo_video_tags 
user_photos 
user_questions 
user_relationship_details 
user_relationships 
user_religion_politics 
user_status 
user_subscriptions 
user_videos 
user_website 
user_work_history 
video_upload xmpp_login

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM