React-native-fbsdk: ShareDialog with many query strings url, only displays one url query

Created on 6 Aug 2019  路  1Comment  路  Source: facebook/react-native-fbsdk

馃悰 Bug Report

I want to share the link with 2 query strings but, when I share facebook. only one sring query is read

Expected Behavior

I want the link to be displayed like this ..

https://play.google.com/store/apps/details?id=com.myapp.example&referralCode=QWSDD

but when I share facebook the results are like this ..

https://play.google.com/store/apps/details?id=com.myapp.example&fbclid=IwAR2VScjO8hZxJRH8JntbK1cPdtGlax0lsRmdNGAk_B6gl1n7iB-IshCfHmc

why only query string id that read, and why referaralCode is replaced with fbcli ?...

Code Example

import { ShareDialog } from 'react-native-fbsdk'

const APP_NAME = 'com.example.project'

const LINK = `https://play.google.com/store/apps/details?id=${APP_NAME}?referralCode=`
const LINK_DESCRIPTION = 'Wow, check out this great app!'

const shareLinkContent = {
  contentType: 'link',
  contentUrl: LINK,
  contentDescription: LINK_DESCRIPTION,
}

export const shareLinkWithShareDialog = (referralCode = null) => {
  shareLinkContent.contentUrl = `${LINK}${referralCode}`
  return ShareDialog.canShow(shareLinkContent)
    .then((canShow) => {
      if (canShow) return ShareDialog.show(shareLinkContent)
      return null
    }).then(
      (result) => {
        if (result.isCancelled) {
          console.log('Share cancelled')
        } else {
          console.log('Share success')
        }
      },
      (error) => {
        console.log(`Share fail with error: ${error}`)
      },
    )
}

Environment

i used react-native-fbsdk: "0.10.1"

Most helpful comment

me too similar.. not share posting...facebook app issue..

>All comments

me too similar.. not share posting...facebook app issue..

Was this page helpful?
0 / 5 - 0 ratings