这可以获取Facebook好友的联系电话号码吗?
我正在iPhone中开发一个应用程序并迭代facebook,我成功获取了所有朋友的名字和他们的ID,所以现在我的要求是获取所有朋友的联系电话号码电话号码或个人电话号码他们所提到的,所以这可能或facebook允许我们接收不同于电子邮件地址的联系我确认facebook不允许我们收取朋友的电子邮件 . 如果facebook允许电话号码,那么请告诉我应该使用哪个权限密钥?
Edited
ACAccountType *FBaccountType= [_accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; NSDictionary *options = [[NSDictionary alloc] initWithObjectsAndKeys: FB_APP_ID, ACFacebookAppIdKey, @[ @"email", @"read_friendlists"], ACFacebookPermissionsKey, nil]; [_accountStore requestAccessToAccountsWithType:FBaccountType options:options completion: ^(BOOL granted, NSError *e)
提前致谢 .
回答(2)
我在他们最近的文档中找到了phone_number,但Facebook在其他任何地方都没有提到它 . 链接:https://developers.facebook.com/docs/ios/graph
// Add the properties particular to the type restaurant.restaurant
restaurant[@"restaurant"] = @{@"category": @[@"Mexican"],
@"contact_info": @{@"street_address": @"123 Some st",
@"locality": @"Menlo Park",
@"region": @"CA",
@"phone_number": @"555-555-555",
@"website": @"http://www.example.com"}};
2 years ago
Facebook没有通过图谱API(https://developers.facebook.com/docs/graph-api/reference/v2.0/user/#fields)和 no, there's no workaround 提供的电话号码 .
此外,请注意,一旦Graph API v2.0于2015年5月1日成为强制性许可,所有
friends-*
权限将无效 .见https://developers.facebook.com/docs/apps/changelog#v2_0_permissions