ios - Facebook shareLinkContent 的深层链接

标签 ios swift facebook facebook-graph-api

我在 iOS 中使用深层链接。我将使用“FBSDKShareLinkContent”在 Facebook 中共享一个链接。我在 Facebook 中创建了深度链接 URL,例如 https://fb.me/****************

我已经完成了 AppInviteContent 并且效果很好:

 

let content : FBSDKAppInviteContent = FBSDKAppInviteContent()
content.appLinkURL = NSURL(string: "https://fb.me/****************")!
content.appInvitePreviewImageURL = NSURL(string: "http://***.***.***.***/shareImage.png" as String)!
FBSDKAppInviteDialog.showWithContent(content, delegate: self)

Now, I am sharing link in Facebook like this:

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/****************)/.

最佳答案

一个非常恰当的想法是使用 Branch 框架来实现深度链接功能。您可以从这里了解如何使用这个框架 https://branch.io/

它可用于将您的应用程序内容分享到任何社交网站。它具有通用链接和深度链接的特性。

关于ios - Facebook shareLinkContent 的深层链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43117999/

相关文章:

iphone - iOS NSNotification 相当于事件吗?

swift - PreferredStatusBarHidden 在调用 setNeedsStatusBarAppearanceUpdate() 后不更新

ios - 使用滚动(手势)重新加载 CollectionView

php - 邀请 friend 加入应用程序 - Facebook

ios - xcode build设置中缺少模拟器 SDK

ios - 在 View Controller 之间传输数据。从 Parse 加载数据时。数据在解析查询填充数据之前传输

ios - SceneKit:如何在没有碰撞的情况下检测接触

ios - Xcode 中 handleOpenURL 的新功能是什么

facebook - 从公共(public) Facebook 帖子的链接获取可嵌入的链接

ios - FBSDKLog : Cannot use the Facebook app or Safari to authorize,