Facebook Deep linking for android app - android

I have a application and i have facebook page for the same.now whenever a user clicks on Use app(call to action) button on android device whether it is facebook android app or user is logged in from browser I need to open my app installed in user's phone.
I have searched so much but came across some old posts as facebook has introduces applinks.org meanwhile.
So I am not getting how to do this thing.

When you're setting up the Call To Action button on your page, you need to select App:
Then you will fill in a URL using your app's custom URL scheme in the Deep Link box (that's what actually launches your app on the visitor's device), and the package name of your app in the Package Name box (I believe Google uses this for verification purposes).
If you haven't set up a custom URL scheme yet, this Facebook docs page explains how. That will take care of opening the app (myApp://), but if you're wanting to go to a specific piece of content (myApp://path/to/content), then you also need to follow these directions.

Related

Prevent android deep link from redirecting to playstore if app doesn't exist

I am working on a website for a product which also has an android application. I want to redirect the user from mobile web browser to the android application when a particular task is performed. I use a deep link of the format as below -
intent://#Intent;package=<PACKAGE_NAME>;action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;scheme=https;end
The issue is that this link is redirecting user to playstore if app is not installed. I wanted user to stay on the web browser if app is not installed. How can we achieve that?
As of now, i tried replacing the intent with https to produce link of the format as below -
https://#Intent;package=<PACKAGE_NAME>;action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;scheme=https;end
But it only works if I add the supported links from the app info, which has to be done manually. I am not sure if the fix for this is to be done in android on is there a way to handle this from the website?

Deep links doesnt work when coming from the same website

I've already been able to setup deep links (universal links), whenever a link to my site (https://app.example.com) is clicked, it automatically opens the app. If its from slack, messenger or another website. The problem is, if I'm inside app.example.com and I create a link to open app.example.com, it doesn't open the app.
I cant seem to find any documentation to address this problem and I'm not sure if its even allowed, but basically this is the flow that I want to achieve:
(inside app) Click Connect Wearable button
(in browser) Default browser opens wearable's login page
(in browser) Wearable redirects to my own site (https://app.example.com/confirmed)
(in browser) Inside this page is a button that says Return to App [href="https://app.example.com/"]
(inside app) App opens
But as mentioned, step 5 doesn't open the app even if I placed a link-button (as expected on how universal links work), it just redirects within the browser.
Any solution? I need to be able to handle android and iOS, as well as not interfere with PC browsers. If needed, I code using Ionic v6.
Thank you!
As far as I know, this is expected behavior.
The reason is,
Let's say your user actually chose to navigate to your website instead of the application. Since the user is already browsing the website, we can assume the user will keep browsing the website, otherwise, he or she would be inside the app already.
This user might navigate to different pages on your website. If deep links try to send users to the app every time, it would be a terrible UX.
If your intent is to always open the app anyways, using a custom URI scheme is the way to go.
You can try defining custom URI scheme for your apps like "myApp://" and use that inside the button in browser.

Do we have any mechanism to track if app is installed from a given URL?

Example:
Link : www.example.com/bje3x
The link will redirect to playstore or appstore url. So if user installs the app from the playstore, can we know if the app ins installed from the redirection URL above?
The question is tagged with firebase-analytics so I guess you are comfortable using Firebase. Then one possible solution for you would be to use Firebase Dynamic Links. They are designed for this use case.
In short you define what is your destination URL - kind of deep link - and if app is installed it just works as a deep link. If app is not installed, it can redirect to AppStore and then inside the app at launch you can retrieve your deep link. Of course it's a bit more complex than that, but essentially it allows you to know what brought the user in.
In the simplest form Dynamic Links use domain provided by Firebase (ending with .page.link) but you can also configure your own domain. Also you don't always get 100% matching accuracy, but for the most part - it should work.
There are also other solutions like branch.io etc. If you look for "deferred deep linking", "smart links" or "dynamic links" you will find more.
Yes we can achieve this by Deep Linking
A deep link is an intent filter system that allows users to directly enter a specific activity in an Android app. However there is an issue about this process. When a user click an URL, it might open a dialog which asks the user to select one of multiple apps handling the given URL.
On the other hand, An Android App Link is a deep link based on your website URL that has been verified to belong to your website. When user clicks that URL, it opens your app.
Please refer this Url
https://medium.com/#muratcanbur/intro-to-deep-linking-on-android-1b9fe9e38abd

How can I smartly redirect users who click on an email link, to my app or my mobile site?

I have an app and a mobile site. I also send emails to my users. I would like the following to happen if my users open these emails on their mobile phones and click on a link:
If a user has installed my app, then launch the app and open the relevant page inside it.
If a user has NOT installed my app, then launch the browser and take him to the relevant page on my mobile site.
I want this to happen seamlessly and automatically. I DON'T want to use the inbuilt android prompt as users end up choosing chrome (since it is the first option shown). How can I do this? Would ideally want solutions for both android & ios.
You can do this with a landing page. Send user to landing page, check platform, then check if they have app installed(if they have registered custom url scheme) if they have then they go to app. Otherwise they go to mobilesite.
See this answer by https://stackoverflow.com/a/29019660/1165581 by Adam
You can NOT prevent the Android prompt which lets the user choose an option. What you can do is, create a link to your mobile site and have your App react to urls containing your domain. So what will happen is:
if a user clicks the link and does NOT have your App installed, he/she will be prompted with the default url handler prompt (only the first time) and then open the mobile site in the prefered browser
if a user clicks the link and DOES have your App installed, he/she will get the same prompt, only your App will be listed there as well next to browser Apps.
Here is an explanation on how to this: Android Respond To URL in Intent
You can use URL Schemes in iOS for your requirement to be full filled. By Using URL Scheme you can do exactly same. Clicking on link will launch your app. Please go through the concept of URL Schemes.
Follow the below referral link:
http://code.tutsplus.com/tutorials/ios-sdk-working-with-url-schemes--mobile-6629
Hope this helps!!

Android Facebook requires reset for applinks to work

I have an applinks enabled app, together with applinks enabled webpage (pointing to the app). I'm trying to do this workflow:
In my app, share a link to my webpage as ACTION_SEND with EXTRA_TEXT
The webpage (e.g. http://lovelikeorhate.eu/question/LIKE/504) contains all the applinks and Facebook specific tags. You can try curl to see it.
Facebook creates a correct preview, using the og:title meta tag from the webpage. Facebook Object Debugger (https://developers.facebook.com/tools/debug/og/object/) doesn't show any errors and reports the Android App Links as present.
When I submit the post to Facebook and then click it in the Facebook app, a browser opens, i.e. applinks are not working.
If I re-login in Facebook, then the applink works as expected, starting my app. Merely deleting cache, killing Facebook app or restarting the device is not enough.
Any ideas what's causing this weird behavior? What should I change to make the applinks work on the first attempt?
I wouldn't worry about this as it's an edge case. The Facebook app may sometimes cache the result of your post, and won't necessarily have all the app links data on your device. However, users on other devices will have the appropriate app links data and link to your app. Eventually, the Facebook app will also refresh its data, and you'll be able to link from your device as well.

Categories

Resources