ios swift - 创建FBSDKShareDialog实例失败

时间:2017-04-27 01:26:59

标签: ios swift3 facebook-ios-sdk

我尝试使用FBSDKShareKit实现共享功能,但是当无法创建FBSDKShareDialog时。代码在这里:

        let content = FBSDKShareLinkContent()
        content.contentDescription = "Some discription"
        content.contentTitle = self.name!
        content.imageURL = self.imgURL

        let shareDialog = FBSDKShareDialog()
        shareDialog.shareContent = content

        shareDialog.delegate = nil
        shareDialog.fromViewController = self
        shareDialog.show()

执行第let shareDialog = FBSDKShareDialog()行时,应用程序崩溃并将此错误消息抛出到控制台:

libc++abi.dylib: terminating with uncaught exception of type NSException

有人知道为什么会这样吗?

0 个答案:

没有答案