我正在尝试使用fb在我的mvc3网站上实现用户注册。我的问题是关注这段代码
FacebookClient fbClient = new FacebookClient(accessToken);
dynamic me = fbClient.Get("me?fields=id,name");
在请求“me?fields = id,name,??”中可以指定哪些其他参数。我的申请需要电子邮件地址,电话号码,地址和姓名(名字,姓氏)。如果有人能告诉我或者更好地指出某个地方我可以找到关于此的文档,我将不胜感激。
答案 0 :(得分:3)
这是您在未经用户许可的情况下进入动态me = fb.Get(“我”)的参数示例:
“的 ID 强>”: “894555532”
“名称”:“John Doe”
“的如first_name 强>”: “约翰”
“的姓氏强>”: “Doe的”
“链接强>”: “http://www.facebook.com/johndoe”
“的用户名强>”: “约翰”
“ bio ”:“样本生物”
“引用”:“\”示例引号“”
“的工作强>”:[{ “的雇主强>”:{ “的 ID 强>”: “39233323343”, “的名称强>” :“样本公司”}
“职位”:{“ id ”:“142461033332450”,“名称”:“后端开发人员”}
“的项目强>”:[{ “的 ID 强>”: “214103971985333”
“名称”:“Coors Light,Sample Project”}]}]
“的 favorite_teams 强>”:[{ “的 ID 强>”: “171522852874952”, “的名称强>”: “尤文”},{“的 ID “:”112325268793829“,”名称“:”巴塞罗那足球俱乐部“}}]
“ favorite_athletes ”:[{“ id ”:“326971266226”,“名称”:“Alessandro Del Piero”}]
“的性别强>”: “男”
“的时区强>”: - 6
“的区域设置强>”: “EN_US”
“的验证强>”:真
“的 updated_time 强>” “2012-01-24T09:12:17 + 0000”}
“电子邮件”需要用户权限
我确定你还可以获得其他东西,尽管还没有正式的c#sdk列表。
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;
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