4

I am building the redirect service for facebook in-app browser, with the main objective:

A: When user clicks the link and has the app installed (3rd party) it should open the deep link in the app right away. B: When user clicks the link and the app is not installed - it should just load the web page inside the facebook in-app browser.

For now I am having these problems:

1) On Android devices if I immediately redirect the user to the link: "intent://#Intent;package=com.app;scheme=com.app.web://deeplink_content;S.browser_fallback_url=https://google.com;end;" the play store appears right after the click, which is not correct behavior. More than that - when I hit "back" on Android control buttons - it redirects me back to facebook with the in-app browser already closed! So there is literally no way to open the link without having the app installed.

In chrome browser on mobile - this link redirects to fallback_url right away - which is what I need, actually.

Any ideas how this can be fixed?

2) On iOs devices this is the only way how it works:

<body>
<script>
    window.location = "com.app.web://deep_link";

    setTimeout(
        function () {
            if (document.hasFocus() === true) {
                // fallback url 
                window.location = "https://google.com";
            }
        },
        100
    );
</script>
</body>

But it always prompts two questions one by one: "Do I want to leave facebook app" and then "Do I want to open this link in my app". And in case if the app is not installed - it's still asking if I want to leave facebook app first and then nothing happens. But at least it works somehow, so I can live with it in comparison to Android...

I was looking for solution with Facebook App Links, tried to add metatags, but probably it's mostly for app developers, because it didn't help at all.

Please, help, I am desperate searching for solution :(

2
  • 1
    have you found a working solution. i had one with iframe. but actually it is not working.
    – swapfile
    Oct 14, 2019 at 17:28
  • nope. Gave up currently... Facebook looks to be very serious and doesn't allow people to leave their in-app browser in any way...
    – egorix
    Dec 19, 2019 at 11:09

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.