0

A few days ago, the deep link I used for opening a Facebook profile directly in the Facebook app (if installed) stopped working. It opens the Facebook app, but displays the error message "This content isn't available".

My current implementation:

if application.canOpenURL(URL(string:"fb://")!) {
    if let appUrl = URL(string: "fb://profile?id=\(profile)") {
        application.open(appUrl)
    } else {
        print("couldn't open facebook url")
    }
}

Value added to Queried URL Schemes in Info.plist: fb (this was enough). Is there another way to do this?

1 Answers1

2

you can use like this

eg: fb://profile?id=4 OR fb://profile?id=zuck but this URL scheme may be removed by Facebook app in the future without any warning and indication.

Source (Swift Open Facebook Profile by FacebookUID)

Chandaboy
  • 1,302
  • 5
  • 10