Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 使用Facebook对话框共享_Ios_Swift_Facebook_Facebook Share - Fatal编程技术网

Ios 使用Facebook对话框共享

Ios 使用Facebook对话框共享,ios,swift,facebook,facebook-share,Ios,Swift,Facebook,Facebook Share,这是我用来分享的代码 在分享时,我得到了如下的崩溃 let content: FBSDKShareLinkContent = FBSDKShareLinkContent() content.contentURL = NSURL(string: "https://www.google.com") content.contentTitle = "ContentTitle" content.contentDescription = "Co

这是我用来分享的代码

在分享时,我得到了如下的崩溃

        let content: FBSDKShareLinkContent = FBSDKShareLinkContent()
        content.contentURL = NSURL(string: "https://www.google.com")
        content.contentTitle = "ContentTitle"
        content.contentDescription = "ContentDescription"

        let shareDialog = FBSDKShareDialog();
        shareDialog.mode = .Browser
        shareDialog.shareContent = content
        shareDialog.show()

我找不到任何解决方案。

假设您正确设置了项目,并且使用了最新版本的Facebook SDK,我会说这是一个bug,应该在假设您正确设置了项目,并且使用了最新版本的Facebook SDK时报告,我认为这是一个bug,应该在
'NSInvalidArgumentException', reason: '-[FBSDKApplicationDelegate openBridgeAPIRequest:useSafariViewController:fromViewController:completionBlock:]: unrecognized selector sent to instance 0x7fa69031c9d0'
*** First throw call stack:
(
    0   CoreFoundation                      0x000000010c2f1e65 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x000000010bcd8deb objc_exception_throw + 48
    2   CoreFoundation                      0x000000010c2fa48d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3   CoreFoundation                      0x000000010c24790a ___forwarding___ + 970
    4   CoreFoundation                      0x000000010c2474b8 _CF_forwarding_prep_0 + 120
    5   Store                               0x000000010a42a858 -[FBSDKShareDialog _showBrowser:] + 417
    6   Store                               0x000000010a4297c8 -[FBSDKShareDialog show] + 327
    7   Store                               0x000000010a351d47 _TFC5Store25StorePlayerViewController17didTapShareButtonfS0_FSiT_ + 1847
    8   Store                               0x000000010a351e6a _TToFC5Store25StorePlayerViewController17didTapShareButtonfS0_FSiT_ + 42
    9   Store                               0x000000010a35acb0 _TTDFC5Store25StorePlayerViewController17didTapShareButtonfS0_FSiT_ + 48
    10  Store                               0x000000010a35231d _TTWC5Store25StorePlayerViewControllerS_31DopeMeterViewControllerDelegateS_FS1_17didTapShareButtonuRq_S1__fq_FSiT_ + 45
    11  Store                               0x000000010a3e24c9 _TFC5Store23DopeMeterViewController12OnShareClickfS0_FCSo8UIButtonT_ + 201
    12  Store                               0x000000010a3e254a _TToFC5Store23DopeMeterViewController12OnShareClickfS0_FCSo8UIButtonT_ + 58
    13  UIKit                               0x000000010c6a1194 -[UIApplication sendAction:to:from:forEvent:] + 92
    14  UIKit                               0x000000010c8106fc -[UIControl sendAction:to:forEvent:] + 67
    15  UIKit                               0x000000010c8109c8 -[UIControl _sendActionsForEvents:withEvent:] + 311
    16  UIKit                               0x000000010c80faf8 -[UIControl touchesEnded:withEvent:] + 601
    17  UIKit                               0x000000010c71049b -[UIWindow _sendTouchesForEvent:] + 835
    18  UIKit                               0x000000010c7111d0 -[UIWindow sendEvent:] + 865
    19  UIKit                               0x000000010c6bfb66 -[UIApplication sendEvent:] + 263
    20  UIKit                               0x000000010c699d97 _UIApplicationHandleEventQueue + 6844
    21  CoreFoundation                      0x000000010c21da31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
    22  CoreFoundation                      0x000000010c21395c __CFRunLoopDoSources0 + 556
    23  CoreFoundation                      0x000000010c212e13 __CFRunLoopRun + 867
    24  CoreFoundation                      0x000000010c212828 CFRunLoopRunSpecific + 488
    25  GraphicsServices                    0x000000010f640ad2 GSEventRunModal + 161
    26  UIKit                               0x000000010c69f610 UIApplicationMain + 171
    27  doopaadoo                           0x00000001090a019d main + 109
    28  libdyld.dylib                       0x0000000112cb192d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException