iOS SDK Version

FBSDKShareDialog

@interfaceFBSDKShareDialog:NSObject<FBSDKSharingDialog>
A dialog for sharing content on Facebook.
  • Convenience method to create a FBSDKShareDialog with a fromViewController, content and a delegate.

    Declaration

    Objective-C
    +(nonnullinstancetype)dialogWithViewController:(nullableUIViewController*)viewControllerwithContent:(nonnullid<FBSDKSharingContent>)contentdelegate:(nullableid<FBSDKSharingDelegate>)delegate;
    Swift
    convenienceinit(fromViewControllerviewController:UIViewController?,content:SharingContent,delegate:SharingDelegate?)

    Parameters

    viewController
    A UIViewController to present the dialog from, if appropriate.
    content
    The content to be shared.
    delegate
    The receiver’s delegate.
  • Convenience method to show an FBSDKShareDialog with a fromViewController, content and a delegate.

    Declaration

    Objective-C
    +(nonnullinstancetype)showFromViewController:(nonnullUIViewController*)viewControllerwithContent:(nonnullid<FBSDKSharingContent>)contentdelegate:(nullableid<FBSDKSharingDelegate>)delegate;

    Parameters

    viewController
    A UIViewController to present the dialog from, if appropriate.
    content
    The content to be shared.
    delegate
    The receiver’s delegate.
  • A UIViewController to present the dialog from.
    If not specified, the top most view controller will be automatically determined as best as possible.

    Declaration

    Objective-C
    @property(nonatomic,weak,readwrite)UIViewController*_NullablefromViewController;
    Swift
    weakvarfromViewController:UIViewController?{getset}
  • The mode with which to display the dialog.
    Defaults to FBSDKShareDialogModeAutomatic, which will automatically choose the best available mode.

    Declaration

    Objective-C
    @property(nonatomic,assign,unsafe_unretained,readwrite)FBSDKShareDialogModemode;
    Swift
    varmode:ShareDialog.Mode{getset}