I am generating link as following and when I share link on instagram it does not work. While sharing link on whatsapp opens the app.

async function shareUserProfile() {
    try {
      const link = await new Promise((resolve, reject) => {
        appsFlyer.setAppInviteOneLinkID('KRgG', null)

        appsFlyer.generateInviteLink(
          {
            channel: 'User_invite',
            campaign: 'ProfileShare',
            deeplinkPath: 'https://shop.shoponpickle.com',
            userParams: {
              af_og_title: 'Pickle',
              af_og_description: 'share.shoponpickle.com',
              af_og_image: profilePicture,
              social_title: 'Pickle',
              social_description: 'share.shoponpickle.com',
              social_image: profilePicture,
              profileName: profileName,
              profileId: profileId,
              linkProfileName: linkProfileName,
              currentUserId: currentUserId,
            },
          },
          (link) => {
            console.log(link)
            resolve(link)
          },
          (err) => {
            console.log(err)
            reject(err)
          },
        )
      })

      Clipboard.setString(link)
      Toast.show({
        type: 'success',
        text1: 'Link copied to clipboard',
        topOffset: 50,
      })
    } catch (error) {
      console.error('Error generating or copying link:', error)
    }
  }

What did you expect to happen? When the App is not installed then it should redirect user to my web page. When the app is installed it should open the app when the link is opened through Instagram story and Messenger.

What happened instead? When link is opened through instagram then it open app store even my app is already installed on the device.

Please provide any other relevant information. I am able to do it through custom onelink urls from appsflyer onelink management portal. But when i do it dynamically through the code, i don't have option to do it as such

0

There are 0 answers