-
- All Implemented Interfaces:
-
com.facebook.share.ShareBuilder
,com.facebook.share.model.ShareModelBuilder
public final class SharePhoto.Builder extends ShareMedia.Builder<SharePhoto, SharePhoto.Builder>
Builder for the com.facebook.share.model.SharePhoto class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
SharePhoto.Builder.Companion
-
Constructor Summary
Constructors Constructor Description SharePhoto.Builder()
-
Method Summary
Modifier and Type Method Description final SharePhoto.Builder
setBitmap(Bitmap bitmap)
Sets the bitmap representation of the photo. final SharePhoto.Builder
setImageUrl(Uri imageUrl)
Sets the URL to the photo. final SharePhoto.Builder
setUserGenerated(Boolean userGenerated)
Sets whether the photo represented by this object was generated by the user or by the application. final SharePhoto.Builder
setCaption(String caption)
Sets the user generated caption for the photo. SharePhoto
build()
Builds the object. SharePhoto.Builder
readFrom(SharePhoto model)
Reads the values from a ShareModel into the builder. -
-
Method Detail
-
setBitmap
final SharePhoto.Builder setBitmap(Bitmap bitmap)
Sets the bitmap representation of the photo.
- Parameters:
bitmap
- android.graphics.Bitmap representation of the photo.
-
setImageUrl
final SharePhoto.Builder setImageUrl(Uri imageUrl)
Sets the URL to the photo.
- Parameters:
imageUrl
- android.net.Uri that points to a network location or the location of the photo on disk.
-
setUserGenerated
final SharePhoto.Builder setUserGenerated(Boolean userGenerated)
Sets whether the photo represented by this object was generated by the user or by the application.
- Parameters:
userGenerated
- Indication of whether the photo is user-generated.
-
setCaption
final SharePhoto.Builder setCaption(String caption)
Sets the user generated caption for the photo. Note that the 'caption' must come from the user, as pre-filled content is forbidden by the Platform Policies (2.3).
- Parameters:
caption
- java.lang.String of a com.facebook.share.model.SharePhoto
-
build
SharePhoto build()
Builds the object.
-
readFrom
SharePhoto.Builder readFrom(SharePhoto model)
Reads the values from a ShareModel into the builder.
- Parameters:
model
- The source ShareModel
-
-
-
-