Export (0) Print
Expand All

SocialFeedManager.CreatePost method

SharePoint 2013

Creates a microblog post or reply.

Namespace:  Microsoft.SharePoint.Client.Social
Assemblies:   Microsoft.SharePoint.Client.UserProfiles.Silverlight (in Microsoft.SharePoint.Client.UserProfiles.Silverlight.dll);  Microsoft.SharePoint.Client.UserProfiles.Phone (in Microsoft.SharePoint.Client.UserProfiles.Phone.dll)  Microsoft.SharePoint.Client.UserProfiles (in Microsoft.SharePoint.Client.UserProfiles.dll)

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

Parameters

targetId
Type: System.String

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

creationData
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.

Show:
© 2015 Microsoft