iOS SDK Version

FBSDKShareDialog

@interfaceFBSDKShareDialog:NSObject<FBSDKSharingDialog>
A dialog for sharing content on Facebook.
  • Deprecated
    init is deprecated and will be removed in the next major release. Please use one of the other available initializers
    Unavailable
    Undocumented

    Declaration

    Objective-C
    -(instancetype)initNS_UNAVAILABLEDEPRECATED_MSG_ATTRIBUTE("`init` is deprecated and will be removed in the next major release. Please use one of the other available initializers");
  • Deprecated
    new is deprecated and will be removed in the next major release. Please use one of the other available initializers
    Unavailable
    Undocumented

    Declaration

    Objective-C
    +(instancetype)newNS_UNAVAILABLEDEPRECATED_MSG_ATTRIBUTE("`new` is deprecated and will be removed in the next major release. Please use one of the other available initializers");
  • Convenience initializer to initialize an FBSDKShareDialog with a view controller, content and delegate.

    Declaration

    Objective-C
    -(nonnullinstancetype)initWithViewController:(nullableUIViewController*)viewControllercontent:(nullableid<FBSDKSharingContent>)contentdelegate:(nullableid<FBSDKSharingDelegate>)delegate;
    Swift
    init(viewController:UIViewController?,content:SharingContent?,delegate:SharingDelegate?)

    Parameters

  • Convenience method to create an FBSDKShareDialog with a view controller, content and delegate.

    Declaration

    Objective-C
    +(nonnullinstancetype)dialogWithViewController:(nullableUIViewController*)viewControllerwithContent:(nullableid<FBSDKSharingContent>)contentdelegate:(nullableid<FBSDKSharingDelegate>)delegate;

    Parameters

  • Convenience method to show an FBSDKShareDialog with a view controller, content and delegate.

    Declaration

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

    Parameters

  • A UIViewController from which to present the dialog.
    If not specified, the topmost 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}