When creating a dynamic link manually there is a ofl parameter for "other platforms". It handles this use case:
The link to open on platforms beside Android and iOS. This is useful to specify a different behavior on desktop, like displaying a full web page of the app content/payload (as specified by param link) with another dynamic link to install the app.
However when using the shortLinks API directly all the other configuration is present except the other platform configuration (and iOS minimum version parameter).
Is this just an oversight in the documentation, or is there no way to specify this parameter in the shortLinks endpoint. Must I create a long link manually and then shorten it?
The only easy way I found in order to have the OFL params is by:
&ofl=[YOUR_LINK] at the end of the linkHere is an example:
const link = [YOUR_LINK];
const domainUriPrefix = [YOUR_DOMAIN_URI_PREFIX];
const ios = [YOUR_IOS_PARAMS];
const android = [YOUR_ANDROID_PARAMS];
const social = [YOUR_SOCIAL_PARAMS];
let uncompressURL = await dynamicLinks().buildLink({
link,
domainUriPrefix,
ios,
android,
social
});
uncompressURL += "&ofl=[YOUR_OFL_LINK]";
let compressURL = await dynamicLinks().buildShortLink({
link: uncompressURL,
domainUriPrefix,
});
The downside of this solution is that you have two redirection instead of one...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With