gpt4 book ai didi

ios - 通过 Messenger 共享对话框共享链接后如何摆脱返回 Messenger

转载 作者:行者123 更新时间:2023-11-30 13:09:12 32 4
gpt4 key购买 nike

目前,这是我打开共享对话框以通过信使共享链接的代码:

let invitationLink = NSURL(string:"http://somelink.com")

if (UIApplication.sharedApplication().canOpenURL(NSURL(string: "fb-messenger-api://")!)){

let share = FBSDKMessageDialog()

share.shareContent = FBSDKShareLinkContent()

share.delegate = self
share.shareContent.contentURL = invitationLink

share.show()
}[![enter image description here][1]][1]

我也通过 View Controller 上的 FBSDKSharingDelegate 处理响应

通过这样做,应用程序会打开 Messenger,似乎当 Messenger 共享完成或取消时,我仍然有“返回 Messenger”,就像 Messenger 应用程序是发起者一样......我本来希望不会看到这一点关闭共享对话框后的“返回 Messenger”按钮..有什么想法吗?

提前致谢,

最佳答案

尝试将此行添加到AppDelegate

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool
{
FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
return true
}

关于ios - 通过 Messenger 共享对话框共享链接后如何摆脱返回 Messenger,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38931451/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com