Firebase动态链接与Facebook应用程序 [英] Firebase dynamic links with Facebook app

查看:583
本文介绍了Firebase动态链接与Facebook应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试使用Firebase动态链接(深层链接)。应用程序的核心应共享社交媒体上的链接。



我已成功创建短链接(200 OK)共享链接到G +和Facebook。但有一个问题


  • 手机浏览器 - >深度链接 - >成功重定向

  • G +应用程序 - >深度链接 - >成功重定向

  • Facebook应用程序 - >深层链接(未安装我的应用程序) - >安装 - >继续 - >成功 > Facebook应用程序 - >深层链接(已安装我的应用程序) - >打开Playstore应用程序显示我的应用程序,而不是运行应用程序


    我在Android开发者网站上建议使用http方案:

     < activity android:name = .LinkActivity > 
    < intent-filter>
    < category android:name =android.intent.category.DEFAULT/>
    < category android:name =android.intent.category.BROWSABLE/>
    < data android:scheme =httpandroid:host =.../>
    < / intent-filter>
    < / activity>

    那么如何正确使用Firebase动态链接与Facebook应用程序?

    解决方案

    Facebook使用 App Links 标签启动其他应用(只有在Android上 - iOS上已经有近一年的时间了)。 Firebase不会自动为动态链接托管App Links标记,因此这是Android上的预期默认行为。



    无法在Firebase中手动指定这些标记。您需要将自己托管在自己的后备网址上,然后Firebase会将其删除并通过。或者,您可以查看 Branch.io (完全披露:我在分支小组中),哪个主机应用链接标签为默认设置。


    I'm currently trying to use Firebase dynamic links (deep links). Core of the application should share the link on social media.

    I've successfully created Short Link (200 OK) shared the link to both G+ and Facebook. But there is a problem

    • Mobile browser -> deep link -> successful redirect
    • G+ app -> deep link -> successful redirect
    • Facebook app -> deep link (not installed my app) -> install -> continue -> success
    • Facebook app -> deep link (installed my app) -> opens Playstore app with my app displayed instead of running the app

    I'm using http scheme as suggested on Android developers site:

        <activity android:name=".LinkActivity">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="http" android:host="..."/>
            </intent-filter>
        </activity>
    

    So How can I properly use Firebase dynamic link with Facebook app?

    解决方案

    Facebook uses App Links tags for launching other apps (and only on Android — it's been broken on iOS for almost a year). Firebase does not automatically host App Links tags for Dynamic Links, so this is the expected default behavior on Android.

    There is no way to manually specify these tags in Firebase, so you'll need to host them yourself on your fallback URL, which Firebase will then scrape and pass through. Alternatively, you can take a look at Branch.io (full disclosure: I'm on the Branch team), which hosts App Link tags be default.

    这篇关于Firebase动态链接与Facebook应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

  • 查看全文
    相关文章
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆