http://blog.csdn.net/ioscircleandcircle/article/details/75088203
//获取用户信息 picture用户头像
- (void)getUserInfoWithResult:(FBSDKLoginManagerLoginResult *)result
{
NSDictionary*params= @{@"fields":@"id,name,email,age_range,first_name,last_name,link,gender,locale,picture,timezone,updated_time,verified"};
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:result.token.userID
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
NSLog(@"%@",result);
/*
{
"age_range" = {
min = 21;
};
"first_name" = "\U6dd1\U5a1f";
gender = female;
id = 320561731689112;
"last_name" = "\U6f58";
link = "https://www.facebook.com/app_scoped_user_id/320561731689112/";
locale = "zh_CN";
name = "\U6f58\U6dd1\U5a1f";
picture = {
data = {
"is_silhouette" = 0;
url = "https://fb-s-c-a.akamaihd.net/h-ak-fbx/v/t1.0-1/p50x50/18157158_290358084709477_3057447496862917877_n.jpg?oh=01ba6b3a5190122f3959a3f4ed553ae8&oe=5A0ADBF5&__gda__=1509731522_7a226b0977470e13b2611f970b6e2719";
};
};
timezone = 8;
"updated_time" = "2017-04-29T07:54:31+0000";
verified = 1;
}
*/
}];
}
网友评论