Presents a Sharing dialog to the user allowing them to post content to their own timeline.
When called in the Unity Editor, a stub function is called instead.
public static void ShareLink(
Uri contentURL = null,
FacebookDelegate<IShareResult> callback = null)
)
| Name | Type | Description | Default |
|---|---|---|---|
contentURL
|
Uri
|
The URL to which this post should link |
null
|
callback
|
FacebookDelegate
<IShareResult>
|
A delegate which will receive the result of the method call |
null
|
Present the user with an opportunity to share a story to their timeline.
FB.ShareLink(
new Uri("https://developers.facebook.com/"),
callback: ShareCallback
);
See additional FB.ShareLink
examples at SDK Examples
.
Shared stories are written in the voice of the user posting them, not the voice of the app (note that the example says "I thought" rather than " username thought"). Using sharing sparingly, and for high-quality content that a user would actually want to share, will increase the number of his/her friends who are likely to see and interact with the story. Make sure to view Facebook Events Manager , and improve or remove story types that are ignored or disliked by your audience.