Facebook帖子屏幕不会自动显示错误信息

时间:2018-07-25 12:44:30

标签: swift

我正在尝试从我的应用程序在Facebook上发布图片,但发布成功升格后,SharePost屏幕不会自动消失 这是我的代码:

let content:FBSDKSharePhotoContent = FBSDKSharePhotoContent()
content.photos = [self.sharePhoto]
let shareDialog: FBSDKShareDialog = FBSDKShareDialog()
shareDialog.shareContent = content
shareDialog.delegate = self
shareDialog.fromViewController = self
shareDialog.show()

FBSdk SharingDelegate方法:

func sharer(_ sharer: FBSDKSharing!, didCompleteWithResults results: 
    [AnyHashable : Any]!) {
    print(results)
    dismiss(animated: true, completion: nil)
}

func sharer(_ sharer: FBSDKSharing!, didFailWithError error: Error!) {
    print(error)
}

func sharerDidCancel(_ sharer: FBSDKSharing!) {
    print("Cancel")
}

0 个答案:

没有答案