-
- All Implemented Interfaces:
-
com.facebook.share.ShareBuilder,com.facebook.share.model.ShareModelBuilder
public class ShareMessengerMediaTemplateContent.Builder extends ShareContent.Builder<ShareMessengerMediaTemplateContent, ShareMessengerMediaTemplateContent.Builder>
Builder for the ShareMessengerMediaTemplateContent interface.
-
-
Field Summary
Fields Modifier and Type Field Description private ShareMessengerMediaTemplateContent.MediaTypemediaTypeprivate StringattachmentIdprivate UrimediaUrlprivate ShareMessengerActionButtonbutton
-
Method Summary
Modifier and Type Method Description ShareMessengerMediaTemplateContent.BuildersetMediaType(ShareMessengerMediaTemplateContent.MediaType mediaType)Set the media type (image or video) for this content. ShareMessengerMediaTemplateContent.BuildersetAttachmentId(String attachmentId)Set the attachmentID of the item to share. ShareMessengerMediaTemplateContent.BuildersetMediaUrl(Uri mediaUrl)Set the Facebook url for this piece of media. ShareMessengerMediaTemplateContent.BuildersetButton(ShareMessengerActionButton button)Set the action button to show below the media. ShareMessengerMediaTemplateContent.BuilderreadFrom(ShareMessengerMediaTemplateContent content)Reads the values from a ShareModel into the builder. ShareMessengerMediaTemplateContentbuild()Builds the object. -
Methods inherited from class com.facebook.share.model.ShareContent.Builder
readFrom, setContentUrl, setPageId, setPeopleIds, setPlaceId, setRef, setShareHashtag -
Methods inherited from class com.facebook.share.model.ShareModelBuilder
readFrom -
Methods inherited from class com.facebook.share.ShareBuilder
build -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
setMediaType
ShareMessengerMediaTemplateContent.Builder setMediaType(ShareMessengerMediaTemplateContent.MediaType mediaType)
Set the media type (image or video) for this content. This must match the media typespecified in the attachmentID/mediaURL to avoid an error when sharing. Defaults to image.
-
setAttachmentId
ShareMessengerMediaTemplateContent.Builder setAttachmentId(String attachmentId)
Set the attachmentID of the item to share. Optional, but either attachmentID or mediaURL mustbe specified.
-
setMediaUrl
ShareMessengerMediaTemplateContent.Builder setMediaUrl(Uri mediaUrl)
Set the Facebook url for this piece of media. External urls will not work; this must be aFacebook url.Optional, but either attachmentID or mediaURL must be specified. Seehttps://developers.facebook.com/docs/messenger-platform/send-messages/template/media fordetails.
-
setButton
ShareMessengerMediaTemplateContent.Builder setButton(ShareMessengerActionButton button)
Set the action button to show below the media.
-
readFrom
ShareMessengerMediaTemplateContent.Builder readFrom(ShareMessengerMediaTemplateContent content)
Reads the values from a ShareModel into the builder.
-
build
ShareMessengerMediaTemplateContent build()
Builds the object.
-
-
-
-