目前,我的代码是打开分享对话框,通过messenger分享链接:
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]我也通过我的视图控制器上的FBSDKSharingDelegate处理响应
通过这样做,应用程序打开Messenger,似乎当messenger共享完成或取消时,我仍然有"Back to Messenger“,就像Messenger应用程序是发起人一样……我本以为在关闭共享对话框后不会看到“返回Messenger”按钮。有什么想法吗?
提前谢谢你,
发布于 2016-08-13 18:22:14
尝试将此行添加到AppDelegate
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool
{
FBSDKApplicationDelegate.sharedInstance().application(application, didFinishLaunchingWithOptions: launchOptions)
return true
}https://stackoverflow.com/questions/38931451
复制相似问题