Facebook not open page in app swift 3

后端 未结 2 1406
清酒与你
清酒与你 2021-01-07 11:24

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.

2条回答
  •  情歌与酒
    2021-01-07 12:27

    If you call the “canOpenURL” method on a URL that is not in your whitelist, it will return “NO”, even if there is an app installed that has registered to handle this scheme. A “This app is not allowed to query for scheme xxx” syslog entry will appear.

    If you call the “openURL” method on a URL that is not in your whitelist, it will fail silently. A “This app is not allowed to query for scheme xxx” syslog entry will appear.

    So you have to put fb in LSApplicationQueriesSchemes in your info.plist

提交回复
热议问题