Android SDK Version
Constructor Summary
Constructor and Description
Builder() 
Method Summary
Modifier and TypeMethod and Description
ShareMessengerMediaTemplateContentbuild()
Builds the object.
ShareMessengerMediaTemplateContent.BuilderreadFrom(ShareMessengerMediaTemplateContent content)
Reads the values from a ShareModel into the builder.
ShareMessengerMediaTemplateContent.BuildersetAttachmentId(java.lang.String attachmentId)
Set the attachmentID of the item to share.
ShareMessengerMediaTemplateContent.BuildersetButton(ShareMessengerActionButton button)
Set the action button to show below the media.
ShareMessengerMediaTemplateContent.BuildersetMediaType(ShareMessengerMediaTemplateContent.MediaType mediaType)
Set the media type (image or video) for this content.
ShareMessengerMediaTemplateContent.BuildersetMediaUrl(Uri mediaUrl)
Set the Facebook url for this piece of media.
Methods inherited from class com.facebook.share.model.
setContentUrl, setPageId, setPeopleIds, setPlaceId, setRef, setShareHashtag
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail

Builder

public Builder()
Method Detail

setMediaType

public ShareMessengerMediaTemplateContent.Builder setMediaType(ShareMessengerMediaTemplateContent.MediaType mediaType)
Set the media type (image or video) for this content. This must match the media type specified in the attachmentID/mediaURL to avoid an error when sharing. Defaults to image.

setAttachmentId

public ShareMessengerMediaTemplateContent.Builder setAttachmentId(java.lang.String attachmentId)
Set the attachmentID of the item to share. Optional, but either attachmentID or mediaURL must be specified.

setMediaUrl

public ShareMessengerMediaTemplateContent.Builder setMediaUrl(Uri mediaUrl)
Set the Facebook url for this piece of media. External urls will not work; this must be a Facebook url.Optional, but either attachmentID or mediaURL must be specified. See https://developers.facebook.com/docs/messenger-platform/send-messages/template/media for details.

setButton

public ShareMessengerMediaTemplateContent.Builder setButton(ShareMessengerActionButton button)
Set the action button to show below the media.

readFrom

public ShareMessengerMediaTemplateContent.Builder readFrom(ShareMessengerMediaTemplateContent content)
Description copied from interface: ShareModelBuilder
Reads the values from a ShareModel into the builder.

build

public ShareMessengerMediaTemplateContent build()
Description copied from interface: ShareBuilder
Builds the object.
Returns:
The built object.