如何从swift 3获取Google联系人列表?
问题描述:
我想从swift 3获取联系人列表?我尝试使用以下网址获取来自Google的联系人,但我有401. That's an error.
。请帮助我如何解决它。如何从swift 3获取Google联系人列表?
https://www.google.com/m8/feeds/contacts/default/full/?access_token=[TOKEN]&alt=json&callback=?
答
试试这个:
if UIApplication.shared.canOpenURL(_YOUR_URL_) {
UIApplication.shared.open(_YOUR_URL_, completionHandler: { (success) in
print("Success") // Prints success
})
}
'_YOUR_URL_'是什么? – ppshein