Facebook SDK Share Link 内容被内容 URL 中的元数据替换

Facebook SDK Share Link content gets replaced by meta data from content URL

我已经为 FBSDKShareLinkContent 设置了内容,并设置了每个参数 contentURL、contentTitle、contentDescription、imageURL。

当共享对话框在 Facebook 原生应用程序中加载时,使用我的参数正确填充

但是,一旦我在 facebook 上查看 post,参数 data 就不再显示 而是 post 标题来自元数据的 contentURL。

如何用我的 contentDescription 和 contentTitle 覆盖元数据? 谢谢!

  // Assemble Content
    var content: FBSDKShareLinkContent = FBSDKShareLinkContent()
    content.contentURL =  NSURL(string: DOWNLOAD_LINK_APPSTORE)
    content.contentTitle = "My Custom Title"
    content.contentDescription = "My Custom Description"
    content.imageURL = NSURL(string: FB_IMAGE_LINK)
   // Share Dialog
    FBSDKShareDialog.showFromViewController(self, withContent: content, delegate: nil)

解决这个问题以防其他人遇到同样的问题。 如果您共享的 URL 是一个 iTunes App Store URL,这种情况会持续发生。将 URL 更改为任何其他网站即可解决问题。

https://developers.facebook.com/docs/sharing/ios "Note: If your app share links to the iTunes or Google Play stores, we do not post any images or descriptions that you specify in the share. Instead we post some app information we scrape from the app store directly with the Webcrawler. This may not include images. To preview a link share to iTunes or Google Play, enter your URL into the URL Debugger."