SocialFeedManager.CreatePost method
Creates a microblog post or reply.
Namespace: Microsoft.SharePoint.Client.Social
Assembly: Microsoft.SharePoint.Client.UserProfiles (in Microsoft.SharePoint.Client.UserProfiles.dll)
Syntax
'Declaration
Public Function CreatePost ( _
targetId As String, _
creationData As SocialPostCreationData _
) As ClientResult(Of SocialThread)
'Usage
Dim instance As SocialFeedManager
Dim targetId As String
Dim creationData As SocialPostCreationData
Dim returnValue As ClientResult(Of SocialThread)
returnValue = instance.CreatePost(targetId, _
creationData)
public ClientResult<SocialThread> CreatePost(
string targetId,
SocialPostCreationData creationData
)
Parameters
targetId
Type: System.StringThe ID of the target to post to (see the Remarks section for more information).
creationData
Type: Microsoft.SharePoint.Client.Social.SocialPostCreationDataThe new post's content and related information.
Return value
Type: Microsoft.SharePoint.Client.ClientResult<SocialThread>
A digest of the new or modified thread.
Remarks
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.