I am not able to generate short dynamic link for sharing. We are using firebase dynamic link share.At the time of link generation got following error
[dynamicLinks/build-failed] The operation couldn’t be completed. Cannot shorten a short Dynamic Link: XXXX [https://firebase.google.com/docs/dynamic-links/rest#create_a_short_link_from_parameters]
Here is my code
import dynamicLinks from '@react-native-firebase/dynamic-links';
export async function buildDynamicLink(Id) {
try {
let shortLink = await dynamicLinks().buildShortLink({
link: 'https://www.xyx.com?id=' + (Id),
domainUriPrefix: 'https://xyz.page.link',
social:{
title: 'xxx',
descriptionText: 'xxx'
},
ios:{
bundleId : 'com.xxx.application'
},
android: {
packageName: 'com.xxx.application'
}
},"SHORT")
return shortLink
} catch (error) {
console.log(error)
}
}