AppsFlyerSDK / appsflyer-react-native-plugin

AppsFlyer plugin for React Native
MIT License
284 stars 202 forks source link

App is not being opened when link is shared on instagram #501

Closed rajpootathar closed 9 months ago

rajpootathar commented 1 year ago

Report

Plugin Version

6.10.3

On what Platform are you having the issue?

ios

What did you do?

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

github-actions[bot] commented 1 year ago

👋 Hi @rajpootathar and Thank you for reaching out to us. In order for us to provide optimal support, please submit a ticket to our support team at support@appsflyer.com. When submitting the ticket, please specify:

BernalCarlos commented 3 months ago

@rajpootathar I'm having the same issue.

Did you manage to solve it?