-2

I'm trying to get contact list from swift 3? I've try with following URL to get contacts from Google but I've got 401. That's an error.. Please help me how to solve it.

https://www.google.com/m8/feeds/contacts/default/full/?access_token=[TOKEN]&alt=json&callback=?
PPShein
  • 13,309
  • 42
  • 142
  • 227

1 Answers1

0

Try this:

if UIApplication.shared.canOpenURL(_YOUR_URL_) {
                UIApplication.shared.open(_YOUR_URL_, completionHandler: { (success) in
                    print("Success") // Prints success
                })
            }