Overview
ShareVideoContent holds a single ShareVideo to share as a Facebook video post. You can supply the video as raw Data, a PHAsset, or a file URL.
Module: FacebookShareDeclared in:
ShareVideoContent.swiftObjective-C name:
FBSDKShareVideoContentConforms to:
SharingContent, SharingValidatable
Initializer
ShareVideoContent uses the default initializer. Create an instance and set the video property:
Properties
The video to share. This is required. Validation fails if no source is set on the
ShareVideo object.An optional URL associated with the content for App Links.
An optional hashtag to include with the share.
User IDs to tag in the post. Defaults to an empty array.
The ID of a Facebook Place to tag with this content.
For Messenger shares, this page ID maps the app to a page and attaches attribution.
A unique identifier automatically generated for this share instance.
ShareVideo
ShareVideo represents a single video. Only one source may be active at a time: data, videoAsset, or videoURL.
Objective-C name: FBSDKShareVideo
Initializers
init(data:previewPhoto:)
Raw video data.
An optional thumbnail image to show before the video plays.
init(videoAsset:previewPhoto:)
A
PHAsset from the Photos library. Must refer to a video.An optional thumbnail image.
init(videoURL:previewPhoto:)
A local file URL or an
assets-library URL pointing to the video on device.An optional thumbnail image.
Properties
Raw video data. Setting this clears
videoAsset and videoURL.A
PHAsset from the Photos library. Setting this clears data and videoURL.A file URL to the video. Setting this clears
data and videoAsset. Supports file:// and assets-library:// schemes.An optional
SharePhoto used as the video thumbnail. Setting the source (data, videoAsset, or videoURL) automatically clears this property.