Why this deep link (applink), generated by facebook does not work?

后端 未结 2 711
隐瞒了意图╮
隐瞒了意图╮ 2021-01-07 03:09

I want to make a button on my website, that will allow user to open native facebook app (if it is installed), or open facebook website otherwise. As i understood, i have to

2条回答
  •  星月不相逢
    2021-01-07 03:49

    AppLinks are a protocol that only Facebook native supports. This means that only the Facebook native apps for Android and iOS will properly parse the metatags and take action. All other browsers and platforms ignore them.

    In order to properly handle linking in other browsers, you use the client side JS redirection code in addition to AppLinks to support redirection in other browsers. If you don't want to build this all out, I built a free tool called branch.io that will host your links with this client side JS plus auto-configure your AppLinks.

    If you'd rather build it yourself, here's the code you can use for iOS safari:

    
    
    

    And for Android, you can use this client side JS code snippet:

    
    

提交回复
热议问题