Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase short links fallback link

I'm using Firebase dynamic links with link shortener and I want to define fallback link for clients beside Android and iOS. Manually constructed dynamic links have parameter ofl that does exactly what I need The link to open on platforms beside Android and iOS. However it seems that this parameter is missing in shortener documentation. Although ofl is mention in the description of link parameter in shortener docs When users open a Dynamic Link on a desktop web browser, they will load this URL (unless the ofl parameter is specified).

Is it possible to somehow add a fallback url for clients beside Android and iOS (e.g. web) to redirect users there instead of link parameter

like image 206
Kirill Cherepanov Avatar asked Jan 28 '19 12:01

Kirill Cherepanov


1 Answers

By using REST API

POST https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=api_key
Content-Type: application/json

{
  "dynamicLinkInfo": {
    "domainUriPrefix": "https://example.page.link",
    "link": "https://www.example.com/",
    "androidInfo": {
      "androidPackageName": "com.example.android"
    },
    "iosInfo": {
      "iosBundleId": "com.example.ios"
    },
    "desktopInfo": {
      "desktopFallbackLink": "https://www.other-example.com/"
    },
  }
}
like image 62
lonewolf_911 Avatar answered Nov 09 '22 09:11

lonewolf_911