简体   繁体   English

如何知道ios通讯录是否可以访问Facebook联系人

[英]How to know if the ios addressbook can access Facebook contacts

On iOS, I want to know if the user has enabled the contacts app to include Facebook contacts. 在iOS上,我想知道用户是否已启用联系人应用程序以包括Facebook联系人。 (He does so in the iPhone settings under "Facebook", where apps are listed that can connect with facebook). (他在“ Facebook”下的iPhone设置中这样做,其中列出了可以与Facebook连接的应用程序)。 When the Contacts app can connect with Facebook, the user has the option to check "All facebook" in Contacts, so I figured it might be simply a group. 当“联系人”应用程序可以与Facebook连接时,用户可以选择在“联系人”中选中“所有Facebook”,因此我认为它可能只是一个组。 But after checking the names of all groups on a test device (where Contacts is connected with Facebook), no group named "all facebook" or similar showed up. 但是在检查了测试设备(“联系人”与Facebook连接)上的所有组的名称之后,没有显示名为“所有Facebook”或类似名称的组。 So I am wondering: is there any way at all to know if Contacts includes Facebook friends? 所以我想知道:有没有办法知道通讯录中是否包含Facebook朋友? I did not find anything in the documentation. 我没有在文档中找到任何东西。

Thanks very much in advance. 首先十分感谢。

External sources in iOS are not represented as groups, they are defined as ABSource records. iOS中的外部源未表示为组,而是定义为ABSource记录。

Look for ABSource records where KABSourceTypeProperty is NOT set to KABSourceTypeLocal . 查找ABSourceKABSourceTypeProperty设置为KABSourceTypeLocal ABSource记录。 That will pick up everything besides device-local and iCloud-synced contacts. 除了设备本地和iCloud同步的联系人外,这将处理所有其他事项。 I'm not sure how to identify which source (Facebook, Exchange etc.) a particular ABSource refers to. 我不确定如何识别特定ABSource指的是哪个来源(Facebook,Exchange等)。

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

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