public final class ShareApi
extends java.lang.Object
| Constructor and Description |
|---|
ShareApi(com.facebook.share.model.ShareContent shareContent)
Constructs a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canShare()
Returns true if the content can be shared.
|
java.lang.String |
getGraphNode()
Returns the graph node to share to.
|
java.lang.String |
getMessage()
Returns the message the person has provided through the custom dialog that will accompany the
share content.
|
com.facebook.share.model.ShareContent |
getShareContent()
Returns the content to be shared.
|
void |
setGraphNode(java.lang.String graphNode)
Sets the graph node to share to (this can be a user id, event id, page id, group id, album id,
etc).
|
void |
setMessage(java.lang.String message)
Sets the message the person has provided through the custom dialog that will accompany the
share content.
|
void |
share(com.facebook.FacebookCallback<com.facebook.share.Sharer.Result> callback)
Share the content.
|
static void |
share(com.facebook.share.model.ShareContent shareContent,
com.facebook.FacebookCallback<com.facebook.share.Sharer.Result> callback)
Convenience method to share a piece of content.
|
public ShareApi(com.facebook.share.model.ShareContent shareContent)
shareContent - the content to share.public static void share(com.facebook.share.model.ShareContent shareContent,
com.facebook.FacebookCallback<com.facebook.share.Sharer.Result> callback)
shareContent - the content to share.callback - the callback to call once the share is complete.public java.lang.String getMessage()
public void setMessage(java.lang.String message)
message - the message.public java.lang.String getGraphNode()
public void setGraphNode(java.lang.String graphNode)
graphNode - the graph node to share to.public com.facebook.share.model.ShareContent getShareContent()
public boolean canShare()
public void share(com.facebook.FacebookCallback<com.facebook.share.Sharer.Result> callback)
callback - the callback to call once the share is complete.