Android SDK Version
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
Method Summary
Modifier and TypeMethodDescription
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)
ShareMessengerMediaTemplateContentbuild()
Methods inherited from class com.facebook.share.model.ShareContent.Builder
readFrom, setContentUrl, setPageId, setPeopleIds, setPlaceId, setRef, setShareHashtag
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.BuildersetMediaType(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.BuildersetAttachmentId(String attachmentId)
Set the attachmentID of the item to share. Optional, but either attachmentID or mediaURL mustbe specified.

setMediaUrl

ShareMessengerMediaTemplateContent.BuildersetMediaUrl(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.BuildersetButton(ShareMessengerActionButton button)
Set the action button to show below the media.