เวอร์ชั่น iOS SDK

FBSDKSharing

@protocolFBSDKSharing<NSObject>
The common interface for components that initiate sharing.
See
FBSDKShareDialog
See
FBSDKMessageDialog
  • The receiver’s delegate or nil if it doesn’t have a delegate.

    Declaration

    Objective-C
    @property(nonatomic,weak,readwrite)id<FBSDKSharingDelegate>_Nullabledelegate;
    Swift
    weakvardelegate:SharingDelegate?{getset}
  • The content to be shared.

    Declaration

    Objective-C
    @property(nonatomic,copy,readwrite,nullable)id<FBSDKSharingContent>shareContent;
    Swift
    @NSCopyingvarshareContent:SharingContent?{getset}
  • A Boolean value that indicates whether the receiver should fail if it finds an error with the share content.
    If NO, the sharer will still be displayed without the data that was mis-configured. For example, an invalid placeID specified on the shareContent would produce a data error.

    Declaration

    Objective-C
    @property(nonatomic,assign,unsafe_unretained,readwrite)BOOLshouldFailOnDataError;
    Swift
    varshouldFailOnDataError:Bool{getset}
  • Validates the content on the receiver.

    Declaration

    Objective-C
    -(BOOL)validateWithError:(NSError*_Nullable*_Nullable)errorRef;
    Swift
    funcvalidate()throws

    Parameters

    Return Value

    YES if the content is valid, otherwise NO.