FB.FeedShare

Prompts a user to post a feed story. It can be posted to either his/her own timeline (if toId is blank, or set to the user's own Facebook user ID), or to that of one friend (if toID is set to the user ID of that friend).

When called in the Unity Editor, a stub function is called instead.

Parameters

public static void FeedShare(
  string toId = "",
  Uri link = null,
  string linkName = "",
  string mediaSource = "",
  FacebookDelegate<IShareResult> callback = null
)
NameTypeDescriptionDefault

toID

string

The Facebook user ID or username of the user on whose timeline the story should be posted

The current user

link

Uri

The URL to which this post should link

None

linkName

string

The name of the story, shown at the top and rendered as a hyperlink with href set to link

None

mediaSource

string

The URL of audio or video content to display beside the story; see Sharing for Games documentation for details

none

callback

FacebookDelegate <IShareResult>

A delegate which will receive the result of the method call

none

Examples

Present the user with an opportunity to post a story to their own timeline.


FB.FeedShare( link: "https://example.com/myapp/?storyID=thelarch", linkName: "The Larch", callback: FeedCallback );

Best Practices

Feed 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 feed stories 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 watch your app's Analytics, and improve or remove story types that are ignored or disliked by your audience.

You don't need to specify toID to post to the current user's timeline - just leave it empty.