SocialFeedManager.CreatePost method

SharePoint Online

Creates a microblog post or reply.

Namespace:  Microsoft.SharePoint.Client.Social
Assembly:  Microsoft.SharePoint.Client.UserProfiles (in Microsoft.SharePoint.Client.UserProfiles.dll)

public ClientResult<SocialThread> CreatePost(
	string targetId,
	SocialPostCreationData creationData


Type: System.String

The ID of the target to post to (see the Remarks section for more information).

Type: Microsoft.SharePoint.Client.Social.SocialPostCreationData

The new post's content and related information.

Return value

Type: Microsoft.SharePoint.Client.ClientResult<SocialThread>
A digest of the new or modified thread.

The value of the targetId parameter can be one of the following:

  • null to publish a root post to the current user's feed.

  • The thread ID of a post to reply to.

  • The URL of a site feed to post to (for example: http://<server>/<teamSite>/newsfeed.aspx).

For a code example that shows how to publish a post and a reply, see How to: Create and delete posts and retrieve the social feed by using the .NET client object model in SharePoint 2013.