React native firebase dynamic links not working after adding efr=1

4.4k Views Asked by At

Hello i am using dynamic links and these are working as expected what the problem is it is showing me a preview page in ios and i don't want to show a preview page that's why i am adding a efr=1 as in the link but i am getting an error in the browser that invalid url link

const link_URL = await dynamicLinks().buildShortLink({
        link: 'https://reelweb.com/',
        domainUriPrefix: 'https://reelweb.page.link',
        ios: {
            bundleId: 'com.reelweb',
            appStoreId: '34354',
            fallbackUrl: 'https://apps.apple.com/us/app/reelweb-app/id1535962213',
        },
        android: {
            packageName: 'com.reelweb',
            fallbackUrl: 'https://play.google.com/store/apps/details?id=com.reelweb',
        }
    });

sharing url after adding efr

https://reelweb.page.link/mJCyiFDrr78MGoye8&efr=1

So please suggest me how can i remove preview page in the sharing url.

error page

must be a parseable URI, but possibly incomplete to be a DynamicLink.

If you are the developer of this app, ensure that your Dynamic Links domain is correctly configured and that the path component of this URL is valid.

1

There are 1 best solutions below

0
On BEST ANSWER

You can't add params after creating the short link. You have to pass forcedRedirectEnabled: true within navigation while creating the link.

const link_URL = await dynamicLinks().buildShortLink({
        link: 'https://reelweb.com/',
        domainUriPrefix: 'https://reelweb.page.link',
        ios: {
            bundleId: 'com.reelweb',
            appStoreId: '34354',
            fallbackUrl: 'https://apps.apple.com/us/app/reelweb-app/id1535962213',
        },
        android: {
            packageName: 'com.reelweb',
            fallbackUrl: 'https://play.google.com/store/apps/details?id=com.reelweb',
        },
        navigation: {
            forcedRedirectEnabled: true,
        }
    });

Check rnfirebase docs.