Android SDK Version
  • java.lang.Object
    • com.facebook.share.model.ShareContent<P,E>
All Implemented Interfaces:

public abstract class ShareContent<P extends ShareContent,E extends ShareContent.Builder>
extends java.lang.Object
implements ShareModel
Provides the base class for content to be shared. Contains all common methods for the different types of content.
Nested Class Summary
Modifier and TypeClass and Description
static class ShareContent.Builder<P extends ShareContent,E extends ShareContent.Builder>
Abstract builder for ShareContent
Constructor Summary
ModifierConstructor and Description
protected ShareContent(Parcel in) 
protected ShareContent(ShareContent.Builder builder) 
Method Summary
Modifier and TypeMethod and Description
intdescribeContents() 
UrigetContentUrl()
URL for the content being shared.
java.lang.StringgetPageId()
For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share.
java.util.List<java.lang.String>getPeopleIds()
List of Ids for taggable people to tag with this content.
java.lang.StringgetPlaceId()
The Id for a place to tag with this content.
java.lang.StringgetRef()
A value to be added to the referrer URL when a person follows a link from this shared content on feed.
ShareHashtaggetShareHashtag()
Gets the ShareHashtag, if one has been set, for this content.
voidwriteToParcel(Parcel out, int flags) 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail

ShareContent

protected ShareContent(ShareContent.Builder builder)

ShareContent

protected ShareContent(Parcel in)
Method Detail

getContentUrl

public Uri getContentUrl()
URL for the content being shared. This URL will be checked for app link meta tags for linking in platform specific ways.
See documentation for App Links.
Returns:
android.net.Uri representation of the content link.

getPeopleIds

public java.util.List<java.lang.String> getPeopleIds()
List of Ids for taggable people to tag with this content.
See documentation for Taggable Friends.
Returns:
List of Ids for people to tag.

getPlaceId

public java.lang.String getPlaceId()
The Id for a place to tag with this content.
Returns:
The Id for the place to tag.

getPageId

public java.lang.String getPageId()
For shares into Messenger, this pageID will be used to map the app to page and attach attribution to the share.
Returns:
The ID of the Facebook page this share is associated with.

getRef

public java.lang.String getRef()
A value to be added to the referrer URL when a person follows a link from this shared content on feed.
Returns:
The ref for the content.

getShareHashtag

public ShareHashtag getShareHashtag()
Gets the ShareHashtag, if one has been set, for this content.
Returns:
The hashtag

describeContents

public int describeContents()

writeToParcel

public void writeToParcel(Parcel out,
                          int flags)