SocialFeedManager.CreatePost 方法
建立微型部落格文章或回覆。
命名空間: Microsoft.SharePoint.Client.Social
組件: Microsoft.SharePoint.Client.UserProfiles.Silverlight (在 Microsoft.SharePoint.Client.UserProfiles.Silverlight.dll 中); Microsoft.SharePoint.Client.UserProfiles.Phone (在 Microsoft.SharePoint.Client.UserProfiles.Phone.dll 中) Microsoft.SharePoint.Client.UserProfiles (在 Microsoft.SharePoint.Client.UserProfiles.dll 中)
語法
'宣告
Public Function CreatePost ( _
targetId As String, _
creationData As SocialPostCreationData _
) As ClientResult(Of SocialThread)
'用途
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
)
參數
targetId
類型:System.String張貼至 (請參閱 [註解] 區段,如需詳細資訊) 目標的識別碼。
creationData
類型:Microsoft.SharePoint.Client.Social.SocialPostCreationData新的文章的內容和相關資訊。
傳回值
類型:Microsoft.SharePoint.Client.ClientResult<SocialThread>
新增或修改過的對話的摘要。
備註
targetId參數值可以是下列其中一項 ︰
null ,將根文章發佈至目前的使用者的摘要。
若要回覆文章的執行緒識別碼。
張貼至摘要的網站的 URL (例如 ︰ http://<server>/<teamSite>/newsfeed.aspx)。
程式碼範例顯示如何發佈文章和回覆,請參閱How to: Create and delete posts and retrieve the social feed by using the .NET client object model。