SDK深度链接相关操作

创建深度链接

const properties = {
  "templateId" : "<链接模版,Dashboard里获取>"
  , "title" : "<深度链接标题>"
  , "tagName":["<深度链接标签>", "vip2"]
  , "userId": "<链接绑定的用户,但被邀用户点击这条深度链,会绑定>"
  , "linkData":{"<归因参数Key>" : "<归因参数Value>", "key2": "value2"}
  , "redirections" : {
    "android" : {
      "useLand" : true,
      "customUrl" : "https://www.turbolink.ai?android",
    }
    ,"ios" : {
      "useLand" : true,
      "customUrl" : "https://www.turbolink.ai?ios",
    }
    ,"web" : {
      "webFirst" : true,
      "pcCustomUrl" : "https://www.turbolink.ai?pc",
      "h5CustomUrl" : "https://www.turbolink.ai?h5",
    }
    ,"default" : {
      "customUrl" : "https://www.turbolink.ai?default",
    }
  }
  , "share" : {
    "title" : "<分享到社媒的标题>",
    "desc" : "<分享到社媒的描述>",
    "image" : "<分享到社媒的图片URL>",
  }
};
TurboLink.createDeepLink(properties);

创建深度链接回调

TurboLink.withCreateDeepLinkCallback(res => {
  console.log("withCreateDeepLinkCallback: res:" + res)
})

返回参数说明:

shortHash : 深度链接的短链HASH
linkUrl : 深度链接对应的链接url
linkTemplate : 对应的链接模版