【发布时间】:2017-03-30 12:33:17
【问题描述】:
我正在使用 iOS 中的深层链接。我将使用 FBSDKShareLinkContent 在 Facebook 中分享一个链接。我在 Facebook 中创建了深层链接 URL,例如 https://fb.me/****************。
我已经完成了 AppInviteContent,效果很好:
让内容:FBSDKAppInviteContent = FBSDKAppInviteContent() content.appLinkURL = NSURL(字符串:“https://fb.me/****************”)! content.appInvitePreviewImageURL = NSURL(string: "http://***.***.***.***/shareImage.png" as String)! FBSDKAppInviteDialog.showWithContent(内容,委托:自我)现在,我在 Facebook 上分享这样的链接:
let shareLinkContent : FBSDKShareLinkContent = FBSDKShareLinkContent()
shareLinkContent.contentURL = NSURL(string: "https://example.com/a2d69835ae")!
shareLinkContent.contentTitle = "App_Name"
shareLinkContent.contentDescription = "Description"
let dialog : FBSDKShareDialog = FBSDKShareDialog()
dialog.fromViewController = self
dialog.delegate = self
dialog.shareContent = shareLinkContent
dialog.mode = FBSDKShareDialogMode.Web
dialog.show()
如何在这个shareLinkContent中设置深层链接URL(例如https://fb.me/****************)。
【问题讨论】:
-
您想在您的应用程序中显示 Facebook ShareDialog 吗?
-
@AbilashBNair - 是的 Nair。
-
您的 FBSDK pod 版本是多少?
-
@AbilashBNair - FBSDK pod 版本是 4.12.0
标签: ios swift facebook facebook-graph-api