【问题标题】:Branch.io not giving preview for Facebook, working on linkedIn and TwitterBranch.io 没有为 Facebook 提供预览,在linkedIn 和 Twitter 上工作
【发布时间】:2020-06-09 06:48:29
【问题描述】:

我正在使用 branch.io 进行共享。当我分享 Facebook 时没有提供预览。同样在 Linkedin 和 Twitter 上工作

**let buo1 = BranchUniversalObject.init(canonicalIdentifier: "https://appName.app.link/(videoId)")

    buo1.title = "#I am a magnet - watch this magnet video on appName."
    //buo.contentDescription = "My Content Description"
    buo1.imageUrl = imageUrl
    buo1.publiclyIndex = true
    buo1.locallyIndex = true
    buo1.contentMetadata.customMetadata["key1"] = "value1"

    let lp: BranchLinkProperties = BranchLinkProperties()
    lp.channel = "whatsapp"
    lp.channel = "Twitter"
    lp.channel = "LinkedIn"
    lp.channel = "instagram"
    lp.channel = "Mail"
    lp.channel = "Facebook"
    lp.feature = "sharing"
    lp.campaign = "content 123 launch"
    lp.stage = "new user"
    lp.tags = ["four", "five", "six"]

    lp.addControlParam("$desktop_url", withValue: "https://appName.app.link/desktop")
    lp.addControlParam("$ios_url", withValue: "https://appName.app.link/ios")
    lp.addControlParam("$ipad_url", withValue: "https://appName.app.link/ios")
    lp.addControlParam("$android_url", withValue: "https://appName.app.link/android")
    lp.addControlParam("$match_duration", withValue: "2000")**

【问题讨论】:

    标签: swift sharing branch.io


    【解决方案1】:

    Facebook 根据 OG 标签抓取链接。请在您的 BUO 对象中添加必要的 OG tags 属性,以便正确渲染图像。

    这里是自定义 OG 标签的文档链接 - https://help.branch.io/using-branch/docs/creating-a-deep-link#section-open-graph

    【讨论】:

    • 如果可能的话,你能提供源代码吗?
    猜你喜欢
    • 1970-01-01
    • 2011-11-12
    • 2011-10-18
    • 2020-10-10
    • 2021-07-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-22
    • 1970-01-01
    相关资源
    最近更新 更多