Facebook not open page in app swift 3
I have a link to my facebook, on my website, which opens in the phone's browser. I would like it to open in the facebook app by default, if the app is installed. I tried to put this code but it does not work. Opens the facebook page always and only via safari and not through the facebook app. If you can help me please. @IBAction func supporto(_ sender: UIBarButtonItem) { let Username = "831831923611308" let appURL = NSURL(string: "fb://profile/\(Username)")! let webURL = NSURL(string: "https://facebook.com/\(Username)")! let application = UIApplication.shared if application.canOpenURL(appURL