From 72b43a77581d9e5646555b33b0dcdade9bd16c63 Mon Sep 17 00:00:00 2001 From: Ashlesha-MSFT Date: Wed, 17 Jun 2026 15:19:26 +0530 Subject: [PATCH 1/7] Updated links --- .../work-with-social-feeds-in-sharepoint.md | 144 ++++-------------- 1 file changed, 33 insertions(+), 111 deletions(-) diff --git a/docs/general-development/work-with-social-feeds-in-sharepoint.md b/docs/general-development/work-with-social-feeds-in-sharepoint.md index cf32a84764..24ded0a062 100644 --- a/docs/general-development/work-with-social-feeds-in-sharepoint.md +++ b/docs/general-development/work-with-social-feeds-in-sharepoint.md @@ -7,7 +7,6 @@ ms.localizationpriority: medium --- - # Work with social feeds in SharePoint Learn about common programming tasks for working with social feeds and microblog posts in SharePoint. ## APIs for working with social feeds in SharePoint @@ -15,35 +14,17 @@ Learn about common programming tasks for working with social feeds and microblog In SharePoint on-premises farms, interactive social feeds are designed to encourage people to share information and to stay connected with people and content. You can see many of the feed features on the **Newsfeed** page on a user's personal site. Feeds contain collections of threads that represent microblog posts, conversations, status updates, and other notifications. - - SharePoint provides the following APIs that you can use to programmatically work with social feeds: - - - - + - Client object models for managed code - - .NET client object model - - - Silverlight client object model - - - Mobile client object model - - -- JavaScript object model - - +- JavaScript object model - Representational State Transfer (REST) service - - - Server object model - As a best practice in SharePoint development, use client APIs when you can. Client APIs include the client object models, the JavaScript object model, and the REST service. For more information about the APIs in SharePoint and when to use them, see [Choose the right API set in SharePoint](choose-the-right-api-set-in-sharepoint.md). - Each API includes a manager object that you use to perform core feed-related tasks. Table 1 shows the manager and other key objects (or REST resources) in the APIs and the class library (or endpoint URI) where you can find them. @@ -51,26 +32,18 @@ Each API includes a manager object that you use to perform core feed-related tas > [!NOTE] > The Silverlight and mobile client object models are not explicitly mentioned in Table 1 or Table 2 because they provide the same core functionality as the .NET client object model and use the same signatures. The Silverlight client object model is defined in Microsoft.SharePoint.Client.UserProfiles.Silverlight.dll, and the mobile client object model is defined in Microsoft.SharePoint.Client.UserProfiles.Phone.dll. - - - - **Table 1. SharePoint APIs used for working with social feeds programmatically** |**API**|**Key objects**| |:-----|:-----| -|.NET client object model
See: [How to: Create and delete posts and retrieve the social feed by using the .NET client object model in SharePoint](how-to-create-and-delete-posts-and-retrieve-the-social-feed-by-using-the-net-cli.md)|Manager object: [SocialFeedManager](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedManager.aspx)
Primary namespace: [Microsoft.SharePoint.Client.Social](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.aspx)
Other key objects: [SocialFeed](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeed.aspx) , [SocialThread](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialThread.aspx) , [SocialPost](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialPost.aspx) , [SocialPostCreationData](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialPostCreationData.aspx) , [SocialFeedOptions](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedOptions.aspx) , [SocialActor](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialActor.aspx)
Class library: Microsoft.SharePoint.Client.UserProfiles.dll| -|JavaScript object model
See [How to: Create and delete posts and retrieve the social feed by using the JavaScript object model in SharePoint](how-to-create-and-delete-posts-and-retrieve-the-social-feed-by-using-the-javascr.md)|Manager object: [SocialFeedManager](https://msdn.microsoft.com/library/651fdf0f-841d-88f9-1e07-fcb3ad8c9410%28Office.15%29.aspx)
Primary namespace: [SP.Social](https://msdn.microsoft.com/library/43d47f01-c085-0e77-bd01-48bcb7d5bb35%28Office.15%29.aspx)
Other key objects: [SocialFeed](https://msdn.microsoft.com/library/356c5475-2fd6-a655-c271-5d7f21af45e2%28Office.15%29.aspx), [SocialThread](https://msdn.microsoft.com/library/46aa4beb-d708-f20e-471e-626c8a7efab7%28Office.15%29.aspx), [SocialPost](https://msdn.microsoft.com/library/a761ce71-d3d7-420a-1e06-962674124dfa%28Office.15%29.aspx), [SocialPostCreationData](https://msdn.microsoft.com/library/f0e1fa3e-6fc9-48e0-5570-92091abfef33%28Office.15%29.aspx), [SocialFeedOptions](https://msdn.microsoft.com/library/65caf283-6e7a-50dc-ef8e-a4e12bd237ac%28Office.15%29.aspx), [SocialActor](https://msdn.microsoft.com/library/4e369fd5-b9b0-9804-957e-b3e39c559cd4%28Office.15%29.aspx)
Class library: SP.UserProfiles.js| +|.NET client object model
See: [How to: Create and delete posts and retrieve the social feed by using the .NET client object model in SharePoint](how-to-create-and-delete-posts-and-retrieve-the-social-feed-by-using-the-net-cli.md)|Manager object: [SocialFeedManager](/previous-versions/office/sharepoint-csom/jj163796(v=office.15))
Primary namespace: [Microsoft.SharePoint.Client.Social](/previous-versions/office/sharepoint-csom/jj164417(v=office.15))
Other key objects: [SocialFeed](/previous-versions/office/sharepoint-csom/jj164380(v=office.15)) , [SocialThread](/previous-versions/office/sharepoint-csom/jj164766(v=office.15)) , [SocialPost](/previous-versions/office/sharepoint-csom/jj163401(v=office.15)) , [SocialPostCreationData](/previous-versions/office/sharepoint-csom/jj163520(v=office.15)) , [SocialFeedOptions](/previous-versions/office/sharepoint-csom/jj164730(v=office.15)) , [SocialActor](/previous-versions/office/sharepoint-csom/jj164459(v=office.15))
Class library: Microsoft.SharePoint.Client.UserProfiles.dll| +|JavaScript object model
See [How to: Create and delete posts and retrieve the social feed by using the JavaScript object model in SharePoint](how-to-create-and-delete-posts-and-retrieve-the-social-feed-by-using-the-javascr.md)|Manager object: [SocialFeedManager](/previous-versions/office/sharepoint-visio/jj679709(v=office.15))
Primary namespace: [SP.Social](/previous-versions/office/sharepoint-visio/jj628683(v=office.15))
Other key objects: [SocialFeed](/previous-versions/office/sharepoint-visio/jj679727(v=office.15)), [SocialThread](/previous-versions/office/sharepoint-visio/jj679762(v=office.15)), [SocialPost](/previous-versions/office/sharepoint-visio/jj667849(v=office.15)), [SocialPostCreationData](/previous-versions/office/sharepoint-visio/jj667907(v=office.15)), [SocialFeedOptions](/previous-versions/office/sharepoint-visio/jj679710(v=office.15)), [SocialActor](/previous-versions/office/sharepoint-visio/jj679768(v=office.15))
Class library: SP.UserProfiles.js| |REST service
See [How to: Learn to read and write to the social feed by using the REST service in SharePoint](how-to-learn-to-read-and-write-to-the-social-feed-by-using-the-rest-service-in-s.md)|Manager resource: [social.feed](social-feed-rest-api-reference-for-sharepoint.md) (SocialRestFeedManager)
Primary namespace (OData): **SP.Social**
Other key resources: SocialFeed, [SocialRestFeed](social-feed-rest-api-reference-for-sharepoint.md#bk_SocialRestFeed), SocialThread, [SocialRestThread](social-feed-rest-api-reference-for-sharepoint.md#bk_SocialRestThread), SocialPost, SocialPostCreationData, [SocialRestPostCreationData](social-feed-rest-api-reference-for-sharepoint.md#bk_SocialRestPostCreationData), [SocialFeedOptions](social-feed-rest-api-reference-for-sharepoint.md#bk_SocialFeedOptions), SocialActor, [SociaRestActor](social-feed-rest-api-reference-for-sharepoint.md#bk_SocialRestActor)
Access point: `/_api/social.feed`| -|Server object model
Note: Code that uses the server object model to access feed data and runs remotely must use an [SPServiceContextScope](https://msdn.microsoft.com/library/Microsoft.SharePoint.SPServiceContextScope.aspx) object.|Manager object: [SPSocialFeedManager](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.aspx)
Primary namespace: [Microsoft.Office.Server.Social](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.aspx)
Other key objects: [SPSocialFeed](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeed.aspx) , [SPSocialThread](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialThread.aspx) , [SPSocialPost](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialPost.aspx) , [SPSocialFeedOptions](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedOptions.aspx) , [SPSocialActor](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialActor.aspx)
Class library: Microsoft.Office.Server.UserProfiles.dll| +|Server object model
Note: Code that uses the server object model to access feed data and runs remotely must use an [SPServiceContextScope](/previous-versions/office/sharepoint-server/ee585864(v=office.15)) object.|Manager object: [SPSocialFeedManager](/previous-versions/office/sharepoint-server/jj264599(v=office.15))
Primary namespace: [Microsoft.Office.Server.Social](/previous-versions/office/sharepoint-server/jj264549(v=office.15))
Other key objects: [SPSocialFeed](/previous-versions/office/sharepoint-server/jj263396(v=office.15)) , [SPSocialThread](/previous-versions/office/sharepoint-server/jj267122(v=office.15)) , [SPSocialPost](/previous-versions/office/sharepoint-server/jj275545(v=office.15)) , [SPSocialFeedOptions](/previous-versions/office/sharepoint-server/jj275763(v=office.15)) , [SPSocialActor](/previous-versions/office/sharepoint-server/jj275459(v=office.15))
Class library: Microsoft.Office.Server.UserProfiles.dll| -If you're using the server object model to access feed content and your code isn't running in a SharePoint instance (in other words, if your extension is not installed in the LAYOUTS folder on the application server), use an [SPServiceContextScope](https://msdn.microsoft.com/library/Microsoft.SharePoint.SPServiceContextScope.aspx) object in your code. The following code example shows one way to incorporate the [SPServiceContextScope](https://msdn.microsoft.com/library/Microsoft.SharePoint.SPServiceContextScope.aspx) object into your code. +If you're using the server object model to access feed content and your code isn't running in a SharePoint instance (in other words, if your extension is not installed in the LAYOUTS folder on the application server), use an [SPServiceContextScope](/previous-versions/office/sharepoint-server/ee585864(v=office.15)) object in your code. The following code example shows one way to incorporate the [SPServiceContextScope](/previous-versions/office/sharepoint-server/ee585864(v=office.15)) object into your code. - - - - - + ```csharp using (SPSite site = new SPSite()) @@ -89,121 +62,70 @@ using (SPSite site = new SPSite()) Table 2 shows common programming tasks for working with social feeds and the members that you use to perform them. Members are from the .NET client object model (CSOM), JavaScript object model (JSOM), REST service, and server object model (SSOM). - - **Table 2. API for common programming tasks for working with social feeds in SharePoint** |**Task**|**Members**| |:-----|:-----| -|Create an instance of the manager object in the context of the current user|CSOM: [SocialFeedManager](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedManager.aspx)
JSOM: [SocialFeedManager](https://msdn.microsoft.com/library/f7cf172f-970b-6b71-9eb4-b9a8bb7a0001%28Office.15%29.aspx)
REST: **GET** [`/_api/social.feed`](social-feed-rest-api-reference-for-sharepoint.md)
SSOM: [SPSocialFeedManager](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.aspx)| -|Create an instance of the manager object in the context of a particular user|CSOM: not implemented
JSOM: not implemented
REST: not implemented
SSOM: [SPSocialFeedManager](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.aspx)| -|Get the user for the current context|CSOM: [Owner](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedManager.Owner.aspx)
JSOM: [owner](https://msdn.microsoft.com/library/0307264e-d733-77f0-edae-f5468e58d0b7%28Office.15%29.aspx)
REST: **GET** [`/_api/social.feed/my`](social-feed-rest-api-reference-for-sharepoint.md#bk_my)
SSOM: [Owner](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.Owner.aspx)| -|Get the feed for the current user
(specify the feed type)|CSOM: [GetFeed](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedManager.GetFeed.aspx)
JSOM: [getFeed](https://msdn.microsoft.com/library/cddaccd8-28da-6798-d8cb-4e9351efddf3%28Office.15%29.aspx)
REST: **GET** [`/_api/social.feed/my/Feed`](social-feed-rest-api-reference-for-sharepoint.md#bk_myFeed) (personal feed.md), [`/_api/social.feed/my/News`](social-feed-rest-api-reference-for-sharepoint.md#bk_myNews), [`/_api/social.feed/my/TimelineFeed`](social-feed-rest-api-reference-for-sharepoint.md#bk_myTimelineFeed), or [`/_api/social.feed/my/Likes`](social-feed-rest-api-reference-for-sharepoint.md#bk_myLikes)
SSOM: [GetFeed](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.GetFeed.aspx)| -|Get the personal feed for a particular user|CSOM: [GetFeedFor](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedManager.GetFeedFor.aspx)
JSOM: [getFeedFor](https://msdn.microsoft.com/library/074ed255-9393-448d-1f7e-720fdeb05f48%28Office.15%29.aspx)
REST: **GET** [`/_api/social.feed/actor(item='domain\\user')/Feed`](social-feed-rest-api-reference-for-sharepoint.md#bk_actorFeed)
SSOM: [GetFeedFor](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.GetFeedFor.aspx)| -|Get the site feed for a team site
(specify the URL of the site feed as the actor (example: http://\/\/newsfeed.aspx))|CSOM: [GetFeedFor](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedManager.GetFeedFor.aspx)
JSOM: [getFeedFor](https://msdn.microsoft.com/library/074ed255-9393-448d-1f7e-720fdeb05f48%28Office.15%29.aspx)
REST: **GET** [`/_api/social.feed/actor(item=@v)/Feed?@v='http:////newsfeed.aspx'`](social-feed-rest-api-reference-for-sharepoint.md#bk_actorFeed)
SSOM: [GetFeedFor](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.GetFeedFor.aspx)| -|Publish a root post to the current user's feed
(specify **null** for the target)|CSOM: [CreatePost](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedManager.CreatePost.aspx)
JSOM: [createPost](https://msdn.microsoft.com/library/e9ad06a1-831d-8ed0-c76e-8b049f14216f%28Office.15%29.aspx)
REST: **POST** [`/_api/social.feed/my/Feed/Post`](social-feed-rest-api-reference-for-sharepoint.md#bk_myFeedPost) and pass the _restCreationData_ parameter in the request body
SSOM: [CreatePost](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.CreatePost.aspx)| -|Publish a post to a site feed
(specify the URL of the site feed as the target (example: http://\/teamSite>/newsfeed.aspx))|CSOM: [CreatePost](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedManager.CreatePost.aspx)
JSOM: [createPost](https://msdn.microsoft.com/library/e9ad06a1-831d-8ed0-c76e-8b049f14216f%28Office.15%29.aspx)
REST: **POST** [`/_api/social.feed/actor(item=@av)/feed/post/?@av='/newsfeed.aspx'`](social-feed-rest-api-reference-for-sharepoint.md#bk_actorFeedPost) and pass the _restCreationData_ parameter in the request body (specify **null** for the _ID_ parameter)
SSOM: [CreatePost](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.CreatePost.aspx)| -|Publish a reply to a post
(specify the ID of the target thread)|CSOM: [CreatePost](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedManager.CreatePost.aspx)
JSOM: [createPost](https://msdn.microsoft.com/library/e9ad06a1-831d-8ed0-c76e-8b049f14216f%28Office.15%29.aspx)
REST: **POST** [`/_api/social.feed/Post/Reply`](social-feed-rest-api-reference-for-sharepoint.md#bk_postReply) and pass the _restCreationData_ parameter in the request body
SSOM: [CreatePost](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.CreatePost.aspx)| -|Delete a post, reply, or thread in the current user's feed (deleting a root post deletes the whole thread)|CSOM: [DeletePost](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedManager.DeletePost.aspx)
JSOM: [deletePost](https://msdn.microsoft.com/library/06e03f87-c97d-8634-a02b-f7812eb7beeb%28Office.15%29.aspx)
REST: **POST** [`/_api/social.feed/Post/Delete`](social-feed-rest-api-reference-for-sharepoint.md#bk_postDelete) and pass the _ID_ parameter in the request body
SSOM: [DeletePost](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.DeletePost.aspx)| -|Get a thread (a root post and all its replies) from the user's feed|CSOM: [GetFullThread](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedManager.GetFullThread.aspx)
JSOM: [getFullThread](https://msdn.microsoft.com/library/6bb384f3-9474-581f-e18d-e8c4f44c3cdf%28Office.15%29.aspx)
REST: **POST** [`/_api/social.feed/Post`](social-feed-rest-api-reference-for-sharepoint.md#bk_post) and pass the _ID_ parameter in the request body
SSOM: [GetFullThread](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.GetFullThread.aspx)| -|Have the user like (unlike) a post or reply|CSOM: [LikePost](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedManager.LikePost.aspx) ( [UnlikePost](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedManager.UnlikePost.aspx) )
JSOM: [likePost](https://msdn.microsoft.com/library/f401a584-1712-50af-ee08-2999a16388d6%28Office.15%29.aspx) ( [unlikePost](https://msdn.microsoft.com/library/c778bd7d-91e5-15dc-eeb8-b571957e8338%28Office.15%29.aspx))
REST: **POST** [`/_api/social.feed/Post/Like`](social-feed-rest-api-reference-for-sharepoint.md#bk_postLike) ( [`/_api/social.feed/Post/Unlike`](social-feed-rest-api-reference-for-sharepoint.md#bk_postUnlike)) and pass the _ID_ parameter in the request body
SSOM: [LikePost](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.LikePost.aspx) ( [UnlikePost](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.UnlikePost.aspx) )| -|Get all likers for a post|CSOM: [GetAllLikers](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedManager.GetAllLikers.aspx)
JSOM: [getAllLikers](https://msdn.microsoft.com/library/76286fdc-002f-2b13-dc26-53097eb2e3a2%28Office.15%29.aspx)
REST: **POST** [`/_api/social.feed/Post/Likers`](social-feed-rest-api-reference-for-sharepoint.md#bk_postLikers) and pass the _ID_ parameter in the request body
SSOM: [GetAllLikers](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.GetAllLikers.aspx)| -|Get the posts that mention a user|CSOM: [GetMentions](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedManager.GetMentions.aspx)
JSOM: [getMentions](https://msdn.microsoft.com/library/78f064c3-5b96-373e-e7f0-8603aedc5ded%28Office.15%29.aspx)
REST: **GET** [`/_api/social.feed/my/MentionFeed`](social-feed-rest-api-reference-for-sharepoint.md#bk_myMentionFeed)
SSOM: [GetMentions](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.GetMentions.aspx)| -|Get the number of unread mentions for the current user|CSOM: [GetUnreadMentionCount](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedManager.GetUnreadMentionCount.aspx)
JSOM: [getUnreadMentionCount](https://msdn.microsoft.com/library/18dde16a-f78f-f65e-0644-4eb737b1ae00%28Office.15%29.aspx)
REST: **GET** [`/_api/social.feed/my/UnreadMentionCount`](social-feed-rest-api-reference-for-sharepoint.md#bk_myUnreadMentionCount)
SSOM: [GetUnreadMentionCount](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.GetUnreadMentionCount.aspx)| -|Lock (unlock) a thread in the current user's feed|CSOM: [LockThread](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedManager.LockThread.aspx) ( [UnlockThread](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFeedManager.UnlockThread.aspx) )
JSOM: [lockThread](https://msdn.microsoft.com/library/cc696bb7-e7fd-7a57-5db5-736c3733589e%28Office.15%29.aspx) ( [unlockThread](https://msdn.microsoft.com/library/ee9288d6-ace0-1ec2-ea7c-0ee300b6e1ea%28Office.15%29.aspx))
REST: **POST** [`/_api/social.feed/Post/Lock`](social-feed-rest-api-reference-for-sharepoint.md#bk_postLock) ( [`/_api/social.feed/Post/Unlock`](social-feed-rest-api-reference-for-sharepoint.md#bk_postUnlock)) and pass the _ID_ parameter in the request body
SSOM: [LockThread](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.LockThread.aspx) ( [UnlockThread](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialFeedManager.UnlockThread.aspx) .md)| +|Create an instance of the manager object in the context of the current user|CSOM: [SocialFeedManager](/previous-versions/office/sharepoint-csom/jj163796(v=office.15))
JSOM: [SocialFeedManager](/previous-versions/office/sharepoint-visio/jj642991(v=office.15))
REST: **GET** [`/_api/social.feed`](social-feed-rest-api-reference-for-sharepoint.md)
SSOM: [SPSocialFeedManager](/previous-versions/office/sharepoint-visio/jj642991(v=office.15))| +|Create an instance of the manager object in the context of a particular user|CSOM: not implemented
JSOM: not implemented
REST: not implemented
SSOM: [SPSocialFeedManager](/previous-versions/office/sharepoint-server/jj264599(v=office.15))| +|Get the user for the current context|CSOM: [Owner](/previous-versions/office/sharepoint-csom/jj164750(v=office.15))
JSOM: [owner](previous-versions/office/sharepoint-visio/jj712736(v=office.15))
REST: **GET** [`/_api/social.feed/my`](social-feed-rest-api-reference-for-sharepoint.md#bk_my)
SSOM: [Owner](/previous-versions/office/sharepoint-server/jj274634(v=office.15))| +|Get the feed for the current user
(specify the feed type)|CSOM: [GetFeed](/previous-versions/office/sharepoint-csom/jj164137(v=office.15))
JSOM: [getFeed](/previous-versions/office/sharepoint-visio/jj667877(v=office.15))
REST: **GET** [`/_api/social.feed/my/Feed`](social-feed-rest-api-reference-for-sharepoint.md#bk_myFeed) (personal feed.md), [`/_api/social.feed/my/News`](social-feed-rest-api-reference-for-sharepoint.md#bk_myNews), [`/_api/social.feed/my/TimelineFeed`](social-feed-rest-api-reference-for-sharepoint.md#bk_myTimelineFeed), or [`/_api/social.feed/my/Likes`](social-feed-rest-api-reference-for-sharepoint.md#bk_myLikes)
SSOM: [GetFeed](//previous-versions/office/sharepoint-server/jj265366(v=office.15))| +|Get the personal feed for a particular user|CSOM: [GetFeedFor](/previous-versions/office/sharepoint-csom/jj164252(v=office.15))
JSOM: [getFeedFor](/previous-versions/office/sharepoint-visio/jj712749(v=office.15))
REST: **GET** [`/_api/social.feed/actor(item='domain\\user')/Feed`](social-feed-rest-api-reference-for-sharepoint.md#bk_actorFeed)
SSOM: [GetFeedFor](/previous-versions/office/sharepoint-server/jj264479(v=office.15))| +|Get the site feed for a team site
(specify the URL of the site feed as the actor (example: http://\/\/newsfeed.aspx))|CSOM: [GetFeedFor](/previous-versions/office/sharepoint-csom/jj164252(v=office.15))
JSOM: [getFeedFor](/previous-versions/office/sharepoint-visio/jj712749(v=office.15))
REST: **GET** [`/_api/social.feed/actor(item=@v)/Feed?@v='http:////newsfeed.aspx'`](social-feed-rest-api-reference-for-sharepoint.md#bk_actorFeed)
SSOM: [GetFeedFor](/previous-versions/office/sharepoint-server/jj264479(v=office.15))| +|Publish a root post to the current user's feed
(specify **null** for the target)|CSOM: [CreatePost](/previous-versions/office/sharepoint-csom/jj164528(v=office.15))
JSOM: [createPost](/previous-versions/office/sharepoint-visio/jj667802(v=office.15))
REST: **POST** [`/_api/social.feed/my/Feed/Post`](social-feed-rest-api-reference-for-sharepoint.md#bk_myFeedPost) and pass the _restCreationData_ parameter in the request body
SSOM: [CreatePost](/previous-versions/office/sharepoint-server/jj263426(v=office.15))| +|Publish a post to a site feed
(specify the URL of the site feed as the target (example: http://\/teamSite>/newsfeed.aspx))|CSOM: [CreatePost](/previous-versions/office/sharepoint-csom/jj164528(v=office.15))
JSOM: [createPost](/previous-versions/office/sharepoint-visio/jj667802(v=office.15))
REST: **POST** [`/_api/social.feed/actor(item=@av)/feed/post/?@av='/newsfeed.aspx'`](social-feed-rest-api-reference-for-sharepoint.md#bk_actorFeedPost) and pass the _restCreationData_ parameter in the request body (specify **null** for the _ID_ parameter)
SSOM: [CreatePost](/previous-versions/office/sharepoint-server/jj263426(v=office.15))| +|Publish a reply to a post
(specify the ID of the target thread)|CSOM: [CreatePost](/previous-versions/office/sharepoint-csom/jj164528(v=office.15))
JSOM: [createPost](/previous-versions/office/sharepoint-visio/jj667802(v=office.15))
REST: **POST** [`/_api/social.feed/Post/Reply`](social-feed-rest-api-reference-for-sharepoint.md#bk_postReply) and pass the _restCreationData_ parameter in the request body
SSOM: [CreatePost](/previous-versions/office/sharepoint-server/jj263426(v=office.15))| +|Delete a post, reply, or thread in the current user's feed (deleting a root post deletes the whole thread)|CSOM: [DeletePost](/previous-versions/office/sharepoint-csom/jj164772(v=office.15))
JSOM: [deletePost](/previous-versions/office/sharepoint-visio/jj712743(v=office.15))
REST: **POST** [`/_api/social.feed/Post/Delete`](social-feed-rest-api-reference-for-sharepoint.md#bk_postDelete) and pass the _ID_ parameter in the request body
SSOM: [DeletePost](/previous-versions/office/sharepoint-server/jj263843(v=office.15))| +|Get a thread (a root post and all its replies) from the user's feed|CSOM: [GetFullThread](/previous-versions/office/sharepoint-csom/jj163905(v=office.15))
JSOM: [getFullThread](/previous-versions/office/sharepoint-visio/jj679723(v=office.15))
REST: **POST** [`/_api/social.feed/Post`](social-feed-rest-api-reference-for-sharepoint.md#bk_post) and pass the _ID_ parameter in the request body
SSOM: [GetFullThread](/previous-versions/office/sharepoint-server/jj267783(v=office.15))| +|Have the user like (unlike) a post or reply|CSOM: [LikePost](/previous-versions/office/sharepoint-csom/jj164041(v=office.15)) ( [UnlikePost](/previous-versions/office/sharepoint-csom/jj164030(v=office.15)) )
JSOM: [likePost](/previous-versions/office/sharepoint-visio/jj667821(v=office.15)) ( [unlikePost](/previous-versions/office/sharepoint-visio/jj667764(v=office.15)))
REST: **POST** [`/_api/social.feed/Post/Like`](social-feed-rest-api-reference-for-sharepoint.md#bk_postLike) ( [`/_api/social.feed/Post/Unlike`](social-feed-rest-api-reference-for-sharepoint.md#bk_postUnlike)) and pass the _ID_ parameter in the request body
SSOM: [LikePost](/previous-versions/office/sharepoint-server/jj264632(v=office.15)) ( [UnlikePost](/previous-versions/office/sharepoint-server/jj263809(v=office.15)) )| +|Get all likers for a post|CSOM: [GetAllLikers](/previous-versions/office/sharepoint-csom/jj164473(v=office.15))
JSOM: [getAllLikers](/previous-versions/office/sharepoint-visio/jj679813(v=office.15))
REST: **POST** [`/_api/social.feed/Post/Likers`](social-feed-rest-api-reference-for-sharepoint.md#bk_postLikers) and pass the _ID_ parameter in the request body
SSOM: [GetAllLikers](/previous-versions/office/sharepoint-server/jj264427(v=office.15))| +|Get the posts that mention a user|CSOM: [GetMentions](/previous-versions/office/sharepoint-csom/jj164406(v=office.15))
JSOM: [getMentions](/previous-versions/office/sharepoint-visio/jj679814(v=office.15))
REST: **GET** [`/_api/social.feed/my/MentionFeed`](social-feed-rest-api-reference-for-sharepoint.md#bk_myMentionFeed)
SSOM: [GetMentions](/previous-versions/office/sharepoint-server/jj265152(v=office.15))| +|Get the number of unread mentions for the current user|CSOM: [GetUnreadMentionCount](/previous-versions/office/sharepoint-csom/jj164272(v=office.15))
JSOM: [getUnreadMentionCount](/previous-versions/office/sharepoint-visio/jj679621(v=office.15))
REST: **GET** [`/_api/social.feed/my/UnreadMentionCount`](social-feed-rest-api-reference-for-sharepoint.md#bk_myUnreadMentionCount)
SSOM: [GetUnreadMentionCount](/previous-versions/office/sharepoint-server/jj265154(v=office.15))| +|Lock (unlock) a thread in the current user's feed|CSOM: [LockThread](/previous-versions/office/sharepoint-csom/jj163792(v=office.15)) ( [UnlockThread](/previous-versions/office/sharepoint-csom/jj163948(v=office.15)) )
JSOM: [lockThread](/previous-versions/office/sharepoint-visio/jj667876(v=office.15)) ( [unlockThread](/previous-versions/office/sharepoint-visio/jj667811(v=office.15)))
REST: **POST** [`/_api/social.feed/Post/Lock`](social-feed-rest-api-reference-for-sharepoint.md#bk_postLock) ( [`/_api/social.feed/Post/Unlock`](social-feed-rest-api-reference-for-sharepoint.md#bk_postUnlock)) and pass the _ID_ parameter in the request body
SSOM: [LockThread](/previous-versions/office/sharepoint-server/jj264687(v=office.15)) ( [UnlockThread](/previous-versions/office/sharepoint-server/jj275503(v=office.15)) .md)| > [!NOTE] > The _domain\\user_ placeholder value in the REST example should be replaced with the account name of an actual user. To see how to pass a REST parameter in a request body, see the [examples](social-feed-rest-api-reference-for-sharepoint.md#bk_exampleRequests) in the Social feed REST API reference. - - - -SharePoint does not provide an API to customize the layout or rendering of microblog posts directly. SharePoint only provides the data and allows cross-platform and cross-device client applications to define layouts that are appropriate for their form factors and needs. In SharePoint development, you can use JavaScript overrides in client-side rendering, as described in [Customize a list view in SharePoint Add-ins using client-side rendering](https://msdn.microsoft.com/library/8d5cabb2-70d0-46a0-bfe0-9e21f8d67d86%28Office.15%29.aspx). +SharePoint does not provide an API to customize the layout or rendering of microblog posts directly. SharePoint only provides the data and allows cross-platform and cross-device client applications to define layouts that are appropriate for their form factors and needs. In SharePoint development, you can use JavaScript overrides in client-side rendering, as described in [Customize a list view in SharePoint Add-ins using client-side rendering](/sharepoint/dev/sp-add-ins/customize-a-list-view-in-sharepoint-add-ins-using-client-side-rendering). - - ## Overview of feed types in the My Site Social API Feed types represent slices of feed data. When you retrieve a feed for the current user, you can specify one of the following feed types: - - - - **Personal** contains the posts and updates that are generated from a user. On My Site, this feed is shown on a user's **About me** page. - - - **News** contains the posts and updates that are generated from the current user and from the people and the content that the user is following. When you retrieve the **News** feed type, use the **ByModifiedTime** sort order option to get the most recent (cached) activities from the people who the user is following. On My Site, this feed is shown on a user's **Newsfeed** page. - - - **Timeline** contains the posts and updates that are generated from the current user and from the people and the content that the user is following. **Timeline** is particularly useful when you want feed data from a specific time range or when you want to sort with the **ByCreatedTime** option (which includes the largest sampling of people). - - - **Likes** contains reference threads with a **PostReference** property that represents a post that the current user has flagged with the **Like** attribute. - - - **Everyone** contains the threads from the current user's whole organization. - The server, client, and JavaScript object models provide the **GetFeed** method that you can use to retrieve any feed type for the current user and the **GetFeedFor** method that you can use to retrieve the **Personal** feed type (only) for a specified user. Both methods take a **SocialFeedOptions** object as a parameter, which you use to specify the time-based sort order, date range, and maximum number of threads to return. > [!NOTE] > The REST service provides separate resources to retrieve each feed type, as shown in Table 2. - - - If a thread contains more than two replies, the server returns a digest of the thread that contains only the two most recent replies. (Thread digests have the **IsDigest** thread attribute applied.) If you want to get all the replies in a thread, call the **GetFullThread** method from the feed manager object and pass in the thread identifier. - - - + ## See also - -- **Conceptual and how-to articles** - - +- **Conceptual and how-to articles** - [Social and collaboration features in SharePoint](social-and-collaboration-features-in-sharepoint.md) - - -- [Get started developing with social features in SharePoint](get-started-developing-with-social-features-in-sharepoint.md) - - -- [How to: Create and delete posts and retrieve the social feed by using the .NET client object model in SharePoint](how-to-create-and-delete-posts-and-retrieve-the-social-feed-by-using-the-net-cli.md) - - +- [Get started developing with social features in SharePoint](get-started-developing-with-social-features-in-sharepoint.md) +- [How to: Create and delete posts and retrieve the social feed by using the .NET client object model in SharePoint](how-to-create-and-delete-posts-and-retrieve-the-social-feed-by-using-the-net-cli.md) - [How to: Create and delete posts and retrieve the social feed by using the JavaScript object model in SharePoint](how-to-create-and-delete-posts-and-retrieve-the-social-feed-by-using-the-javascr.md) - - - [How to: Learn to read and write to the social feed by using the REST service in SharePoint](how-to-learn-to-read-and-write-to-the-social-feed-by-using-the-rest-service-in-s.md) - - - [How to: Include mentions, tags, and links to sites and documents in posts in SharePoint](how-to-include-mentions-tags-and-links-to-sites-and-documents-in-posts-in-sharep.md) - - - [How to: Embed images, videos, and documents in posts in SharePoint](how-to-embed-images-videos-and-documents-in-posts-in-sharepoint-server.md) - - - [Reference threads and digest threads in SharePoint social feeds](reference-threads-and-digest-threads-in-sharepoint-server-social-feeds.md) + - - **API reference documentation** - - -- [Microsoft.SharePoint.Client.Social](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.aspx) (client object model) - - -- [SP.Social namespace](https://msdn.microsoft.com/library/43d47f01-c085-0e77-bd01-48bcb7d5bb35%28Office.15%29.aspx) (JavaScript object model) - - -- [Social feed REST API reference for SharePoint](social-feed-rest-api-reference-for-sharepoint.md) - - -- [Microsoft.Office.Server.Social](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.aspx) (server object model) - - +- [Microsoft.SharePoint.Client.Social](/previous-versions/office/sharepoint-csom/jj164417(v=office.15)) (client object model) +- [SP.Social namespace](/previous-versions/office/sharepoint-visio/jj628683(v=office.15)) (JavaScript object model) +- [Social feed REST API reference for SharePoint](social-feed-rest-api-reference-for-sharepoint.md) +- [Microsoft.Office.Server.Social](/previous-versions/office/sharepoint-server/jj264549(v=office.15)) (server object model) From d81ee8b4e1eb8a6feaaf90c05c43de07fce86e94 Mon Sep 17 00:00:00 2001 From: Ashlesha-MSFT Date: Wed, 17 Jun 2026 16:44:22 +0530 Subject: [PATCH 2/7] Updated links --- ...g-the-net-client-object-model-in-sharep.md | 106 ++++-------------- 1 file changed, 20 insertions(+), 86 deletions(-) diff --git a/docs/general-development/how-to-follow-documents-and-sites-by-using-the-net-client-object-model-in-sharep.md b/docs/general-development/how-to-follow-documents-and-sites-by-using-the-net-client-object-model-in-sharep.md index 413c9e7924..d83941ee3a 100644 --- a/docs/general-development/how-to-follow-documents-and-sites-by-using-the-net-client-object-model-in-sharep.md +++ b/docs/general-development/how-to-follow-documents-and-sites-by-using-the-net-client-object-model-in-sharep.md @@ -15,71 +15,36 @@ Learn how to work with Following Content features by using the SharePoint .NET c SharePoint users can follow documents, sites, and tags can follow documents, sites, and tags to get updates about the items in their newsfeeds and to quickly open followed documents and sites. You can use the .NET client object model in your app or solution to start following content, stop following content, and get followed content on behalf of the current user. This article shows you how to create a console application that uses the .NET client object model to work with Following Content features for documents and sites. - - - + The following objects are the primary APIs for Following Content tasks: - - - -- [SocialFollowingManager](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFollowingManager.aspx) provides methods for managing a user's list of followed actors. - - -- [SocialActor](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialActor.aspx) represents a document, site, or tag that the server returns in response to a client-side request. - - -- [SocialActorInfo](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialActorInfo.aspx) specifies a document, site, or tag in client-side requests to the server. - - -- [Microsoft.SharePoint.Client.Social.SocialActorType](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialActorType.aspx) and [Microsoft.SharePoint.Client.Social.SocialActorTypes](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialActorTypes.aspx) specify content types in client-side requests to the server. +- [SocialFollowingManager](/previous-versions/office/sharepoint-csom/jj163489(v=office.15)) provides methods for managing a user's list of followed actors. +- [SocialActor](/previous-versions/office/sharepoint-csom/jj164459(v=office.15)) represents a document, site, or tag that the server returns in response to a client-side request. +- [SocialActorInfo](/previous-versions/office/sharepoint-csom/jj164535(v=office.15)) specifies a document, site, or tag in client-side requests to the server. +- [Microsoft.SharePoint.Client.Social.SocialActorType](/previous-versions/office/sharepoint-csom/jj164432(v=office.15)) and [Microsoft.SharePoint.Client.Social.SocialActorTypes](/previous-versions/office/sharepoint-csom/jj164274(v=office.15)) specify content types in client-side requests to the server. > [!NOTE] -> You also use these APIs for Following People tasks, but the **GetSuggestions** and **GetFollowers** methods available from [SocialFollowingManager](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFollowingManager.aspx) only support following people, not content. For more information about how you can use [SocialFollowingManager](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFollowingManager.aspx) , see [Follow content in SharePoint](follow-content-in-sharepoint.md) and [Follow people in SharePoint](follow-people-in-sharepoint.md). For code examples that show how to follow people, see [How to: Follow people by using the .NET client object model in SharePoint](how-to-follow-people-by-using-the-net-client-object-model-in-sharepoint.md). +> You also use these APIs for Following People tasks, but the **GetSuggestions** and **GetFollowers** methods available from [SocialFollowingManager](/previous-versions/office/sharepoint-csom/jj163489(v=office.15)) only support following people, not content. For more information about how you can use [SocialFollowingManager](/previous-versions/office/sharepoint-csom/jj163489(v=office.15)) , see [Follow content in SharePoint](follow-content-in-sharepoint.md) and [Follow people in SharePoint](follow-people-in-sharepoint.md). For code examples that show how to follow people, see [How to: Follow people by using the .NET client object model in SharePoint](how-to-follow-people-by-using-the-net-client-object-model-in-sharepoint.md). - - - - ## Prerequisites for setting up your development environment to work with Following Content features by using the SharePoint .NET client object model To create a console application that uses the .NET client object model to work with Following Content features for documents and sites, you'll need the following: - - - - SharePoint with My Site configured, with the My Site site created for the current user, and with a document uploaded to a SharePoint document library - - -- Visual Studio 2012 - - +- Visual Studio 2022 - **Full Control** access permissions to the User Profile service application for the logged-on user > [!NOTE] > If you are not developing on the computer that is running SharePoint, get the [SharePoint Client Components](https://www.microsoft.com/download/details.aspx?id=35585) download that contains SharePoint client assemblies. - - - - - + ## Create a console application to work with Following Content features by using the SharePoint .NET client object model - 1. In Visual Studio, choose **File**, **New**, **Project**. - - -2. In the **New Project** dialog box, choose **.NET Framework 4.5** from the drop-down list at the top of the dialog box. - - +2. In the **New Project** dialog box, choose **.NET Framework 4.8** from the drop-down list at the top of the dialog box. 3. In the **Templates** list, choose **Windows**, and then choose the **Console Application** template. - - 4. Name the project FollowContentCSOM, and then choose the **OK** button. - - 5. Add references to the following assemblies: - **Microsoft.SharePoint.Client** @@ -92,39 +57,24 @@ To create a console application that uses the .NET client object model to work w - [Get followed content for the current user](how-to-follow-documents-and-sites-by-using-the-net-client-object-model-in-sharep.md#bkmk_GetFollowed) 7. To test the console application, on the menu bar, choose **Debug**, **Start Debugging**. - - ## Code example: Start and stop following content by using the SharePoint .NET client object model The following code example makes the current user start following or stop following a target item. It shows how to: - - - -- Check whether the current user is following a particular document or site by using the [IsFollowed](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFollowingManager.IsFollowed.aspx) method. - - -- Start following a document or site by using the [Follow](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFollowingManager.Follow.aspx) method. - - -- Stop following a document or site by using the [StopFollowing](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFollowingManager.StopFollowing.aspx) method. - +- Check whether the current user is following a particular document or site by using the [IsFollowed](/previous-versions/office/sharepoint-csom/jj163393(v=office.15)) method. -- Get the count of documents or sites that the current user is following by using the [GetFollowedCount](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFollowingManager.GetFollowedCount.aspx) method. +- Start following a document or site by using the [Follow](/previous-versions/office/sharepoint-csom/jj163482(v=office.15)) method. + +- Stop following a document or site by using the [StopFollowing](/previous-versions/office/sharepoint-csom/jj163940(v=office.15)) method. + +- Get the count of documents or sites that the current user is following by using the [GetFollowedCount](/previous-versions/office/sharepoint-csom/jj164386(v=office.15)) method. - -This code example uses the [SocialFollowResult](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFollowResult.aspx) object that is returned by the [Follow](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFollowingManager.Follow.aspx) method to determine whether to start or stop following the target item. +This code example uses the [SocialFollowResult](/previous-versions/office/sharepoint-csom/jj163965(v=office.15)) object that is returned by the [Follow](/previous-versions/office/sharepoint-csom/jj163482(v=office.15)) method to determine whether to start or stop following the target item. > [!NOTE] > Change the placeholder values for the **serverUrl** and **contentUrl** variables before you run the code. To use a site instead of a document, use the variables that are commented out. - - - - - - ```csharp @@ -223,33 +173,22 @@ namespace FollowContentCSOM } ``` - ## Code example: Get followed content by using the SharePoint .NET client object model The following code example gets the documents and sites that the current user is following and gets information about the user's Following Content status. It shows how to: +- Check whether the current user is following the target document and site by using the [IsFollowed](/previous-versions/office/sharepoint-csom/jj163393(v=office.15)) method. +- Get the count of documents and sites that the current user is following by using the [GetFollowedCount](/previous-versions/office/sharepoint-csom/jj164386(v=office.15)) method. - -- Check whether the current user is following the target document and site by using the [IsFollowed](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFollowingManager.IsFollowed.aspx) method. +- Get the documents and sites that the current user is following by using the [GetFollowed](/previous-versions/office/sharepoint-csom/jj163811(v=office.15)) method. - -- Get the count of documents and sites that the current user is following by using the [GetFollowedCount](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFollowingManager.GetFollowedCount.aspx) method. - - -- Get the documents and sites that the current user is following by using the [GetFollowed](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialFollowingManager.GetFollowed.aspx) method. - - - Iterate through the groups of content and get each item's name, content URI, and URI. > [!NOTE] > Change the placeholder value for the **serverUrl**, **docContentUrl**, and **siteContentUrl** variables before you run the code. - - - - - + ```csharp using System; @@ -335,14 +274,9 @@ namespace FollowContentCSOM } ``` - ## See also - - - [Follow content in SharePoint](follow-content-in-sharepoint.md) - - - [How to: Follow documents, sites, and tags by using the REST service in SharePoint](how-to-follow-documents-sites-and-tags-by-using-the-rest-service-in-sharepoint-2.md) From d308e03fd62868039efacea809c70ff02dc5e6ea Mon Sep 17 00:00:00 2001 From: Ashlesha-MSFT Date: Wed, 17 Jun 2026 20:04:00 +0530 Subject: [PATCH 3/7] Updated links and content in SharePoint post guide --- ...-sites-and-documents-in-posts-in-sharep.md | 101 ++++-------------- 1 file changed, 19 insertions(+), 82 deletions(-) diff --git a/docs/general-development/how-to-include-mentions-tags-and-links-to-sites-and-documents-in-posts-in-sharep.md b/docs/general-development/how-to-include-mentions-tags-and-links-to-sites-and-documents-in-posts-in-sharep.md index 3460384310..1682651b03 100644 --- a/docs/general-development/how-to-include-mentions-tags-and-links-to-sites-and-documents-in-posts-in-sharep.md +++ b/docs/general-development/how-to-include-mentions-tags-and-links-to-sites-and-documents-in-posts-in-sharep.md @@ -5,68 +5,46 @@ ms.date: 09/25/2017 ms.assetid: 975da333-372b-4bf6-a3f4-7452db369f04 ms.localizationpriority: medium --- + # Include mentions, tags, and links to sites and documents in posts in SharePoint -Learn how to add [SocialDataItem](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialDataItem.aspx) objects to microblog posts, which render as mentions, tags, or links in SharePoint social feeds. +Learn how to add [SocialDataItem](/previous-versions/office/sharepoint-csom/jj164135(v=office.15)) objects to microblog posts, which render as mentions, tags, or links in SharePoint social feeds. -In a social feed, the simplest form of post content contains only text, but you can also add links that render as mentions, tags, or links to websites, SharePoint sites, and documents. To do this, you add [SocialDataItem](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialDataItem.aspx) objects to the [ContentItems](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialPostCreationData.ContentItems.aspx) property of the [SocialPostCreationData](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialPostCreationData.aspx) object that defines the post. Posts can contain multiple links. +> [!IMPORTANT] +> The SharePoint social feed (microblogging) APIs, including `SocialDataItem` and related `SocialFeedManager` methods, are considered **legacy**. They are primarily intended for existing SharePoint Server solutions and are not recommended for new development. For modern scenarios, consider using Microsoft Graph or Viva Engage APIs where applicable. > [!NOTE] -> To add embedded pictures, videos, or documents to a post's content, you add a [SocialAttachment](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialAttachment.aspx) object to the [SocialPostCreationData.Attachment](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialPostCreationData.Attachment.aspx) property. For more information, see [How to: Embed images, videos, and documents in posts in SharePoint](how-to-embed-images-videos-and-documents-in-posts-in-sharepoint-server.md). - - +> This API is part of the SharePoint Client-Side Object Model (CSOM) and is designed for SharePoint Server environments where social feed features are enabled. Availability and behavior may differ in SharePoint Online. +In a social feed, the simplest form of post content contains only text, but you can also add links that render as mentions, tags, or links to websites, SharePoint sites, and documents. To do this, you add [SocialDataItem](/previous-versions/office/sharepoint-csom/jj164135(v=office.15)) objects to the [ContentItems](/previous-versions/office/sharepoint-csom/jj164726(v=office.15)) property of the [SocialPostCreationData](/previous-versions/office/sharepoint-csom/jj163520(v=office.15)) object that defines the post. Posts can contain multiple links. +> [!NOTE] +> To add embedded pictures, videos, or documents to a post's content, you add a [SocialAttachment](/previous-versions/office/sharepoint-csom/jj163900(v=office.15)) object to the [SocialPostCreationData.Attachment](/previous-versions/office/sharepoint-csom/jj164583(v=office.15)) property. For more information, see [How to: Embed images, videos, and documents in posts in SharePoint](how-to-embed-images-videos-and-documents-in-posts-in-sharepoint-server.md). The API described in this article is from the .NET client object model. However, if you're using another API, such as the JavaScript object model, the object names or corresponding API might be different. See [Additional resources](#bk_addresources) for links to documentation for related APIs. - - - - ## Prerequisites for using the code examples to add links to a post in SharePoint The code examples in this article show how to add links to microblog posts. These examples are from console applications that use the following SharePoint assemblies: - - - - Microsoft.SharePoint.Client - - - Microsoft.SharePoint.Client.Runtime - - -- Microsoft.SharePoint.Client.UserProfilies - +- Microsoft.SharePoint.Client.UserProfiles For instructions about how to set up your development environment and create a console application, see [How to: Create and delete posts and retrieve the social feed by using the .NET client object model in SharePoint](how-to-create-and-delete-posts-and-retrieve-the-social-feed-by-using-the-net-cli.md). - - - ## Example: Include links to websites, SharePoint sites, and documents in a post in SharePoint The following code example publishes a post that contains links to a website, a SharePoint site, and a document. It shows how to: - - - -- Create [SocialDataItem](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialDataItem.aspx) objects that represent the links. Each instance sets the [SocialDataItemType](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialDataItemType.aspx) field for the link type, the display text for the link, and the link URI. - - +- Create [SocialDataItem](/previous-versions/office/sharepoint-csom/jj164135(v=office.15)) objects that represent the links. Each instance sets the [SocialDataItemType](/previous-versions/office/sharepoint-csom/jj164610(v=office.15)) field for the link type, the display text for the link, and the link URI. - Add placeholders to the post text to indicate where the link's display text should appear. - - -- Add the link objects to the [ContentItems](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialPostCreationData.ContentItems.aspx) property of the [SocialPostCreationData](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialPostCreationData.aspx) object that's used to create the post. +- Add the link objects to the [ContentItems](/previous-versions/office/sharepoint-csom/jj164726(v=office.15)) property of the [SocialPostCreationData](/previous-versions/office/sharepoint-csom/jj163520(v=office.15)) object that's used to create the post. > [!NOTE] -> Currently, SharePoint handles links to websites, SharePoint sites, and documents in the same way, but as a best practice, choose the [Site](https://msdn.microsoft.com/library/office/microsoft.sharepoint.client.social.socialdataitemtype.aspx) type and the [Document](https://msdn.microsoft.com/library/office/microsoft.sharepoint.client.social.socialdataitemtype.aspx) type for SharePoint sites and documents. - - - +> Currently, SharePoint handles links to websites, SharePoint sites, and documents in the same way, but as a best practice, choose the [Site](/previous-versions/office/sharepoint-csom/jj164610(v=office.15)) type and the [Document](/previous-versions/office/sharepoint-csom/jj164610(v=office.15)) type for SharePoint sites and documents. In the social feed, clicking a link to a website, SharePoint site, or document opens the item in a separate browser window. @@ -74,11 +52,6 @@ In the social feed, clicking a link to a website, SharePoint site, or document o > Change the placeholder values for the URL variables before you run the code. - - - - - ```csharp using System; @@ -161,23 +134,16 @@ namespace IncludeLinksInPost ``` - ## Example: Mention someone in a post in SharePoint The following code example publishes a post that mentions a user. It shows how to: - - - -- Create a [SocialDataItem](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialDataItem.aspx) object to represent a mention, which is a link to a user. The [SocialDataItem](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialDataItem.aspx) specifies the [SocialDataItemType.User](https://msdn.microsoft.com/library/office/microsoft.sharepoint.client.social.socialdataitemtype.aspx) field and the mentioned person's account name. You can set the account name by using either the person's login or email address. - +- Create a [SocialDataItem](/previous-versions/office/sharepoint-csom/jj164135(v=office.15)) object to represent a mention, which is a link to a user. The [SocialDataItem](/previous-versions/office/sharepoint-csom/jj164135(v=office.15)) specifies the [SocialDataItemType.User](/previous-versions/office/sharepoint-csom/jj164610(v=office.15)) field and the mentioned person's account name. You can set the account name by using either the person's login or email address. - Add a placeholder to the post text to indicate where the mentioned person's display name should appear. - -- Add the [SocialDataItem](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialDataItem.aspx) to the [ContentItems](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialPostCreationData.ContentItems.aspx) property of the [SocialPostCreationData](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialPostCreationData.aspx) object that's used to create the post. - +- Add the [SocialDataItem](/previous-versions/office/sharepoint-csom/jj164135(v=office.15)) to the [ContentItems](/previous-versions/office/sharepoint-csom/jj164726(v=office.15)) property of the [SocialPostCreationData](/previous-versions/office/sharepoint-csom/jj163520(v=office.15)) object that's used to create the post. In the social feed, clicking a mention redirects to the mentioned person's **About** page. @@ -185,11 +151,6 @@ In the social feed, clicking a mention redirects to the mentioned person's **Abo > Change the placeholder values for the **serverURL** and **accountName** variables before you run the code. - - - - - ```csharp using System; @@ -250,22 +211,16 @@ namespace IncludeMentionInPost ``` - ## Example: Include a tag in a post in SharePoint The following code example publishes a post that includes a tag. It shows how to: - - - -- Create a [SocialDataItem](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialDataItem.aspx) object to represent the tag. The [SocialDataItem](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialDataItem.aspx) specifies the [SocialDataItemType.Tag](https://msdn.microsoft.com/library/office/microsoft.sharepoint.client.social.socialdataitemtype.aspx) field and the tag name, which must include a **#** character. - +- Create a [SocialDataItem](/previous-versions/office/sharepoint-csom/jj164135(v=office.15)) object to represent the tag. The [SocialDataItem](/previous-versions/office/sharepoint-csom/jj164135(v=office.15)) specifies the [SocialDataItemType.Tag](/previous-versions/office/sharepoint-csom/jj164610(v=office.15)) field and the tag name, which must include a **#** character. - Add a placeholder to the post text to indicate where the tag should appear. - -- Add the [SocialDataItem](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialDataItem.aspx) to the [ContentItems](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialPostCreationData.ContentItems.aspx) property of the [SocialPostCreationData](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialPostCreationData.aspx) object that's used to create the post. +- Add the [SocialDataItem](/previous-versions/office/sharepoint-csom/jj164135(v=office.15)) to the [ContentItems](/previous-versions/office/sharepoint-csom/jj164135(v=office.15)) property of the [SocialPostCreationData](/previous-versions/office/sharepoint-csom/jj163520(v=office.15)) object that's used to create the post. In the social feed, clicking a tag redirects to the tag's **About** page. If the tag doesn't already exist, the server creates it. @@ -274,11 +229,6 @@ In the social feed, clicking a tag redirects to the tag's **About** page. If the > Change the placeholder values for the **serverURL** and **tagName** variables before you run the code. - - - - - ```csharp using System; @@ -340,24 +290,11 @@ namespace IncludeTagInPost ``` - ## See also - - [Work with social feeds in SharePoint](work-with-social-feeds-in-sharepoint.md) - - -- [SocialPostCreationData](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialPostCreationData.aspx) and [SocialDataItem](https://msdn.microsoft.com/library/Microsoft.SharePoint.Client.Social.SocialDataItem.aspx) in the client object models - - -- [SocialPostCreationData](https://msdn.microsoft.com/library/f0e1fa3e-6fc9-48e0-5570-92091abfef33%28Office.15%29.aspx) and [SocialDataItem](https://msdn.microsoft.com/library/757e7b62-66a6-b03f-0ff0-769a42eb2b4a%28Office.15%29.aspx) in the JavaScript object model - - +- [SocialPostCreationData](/previous-versions/office/sharepoint-csom/jj163520(v=office.15)) and [SocialDataItem](/previous-versions/office/sharepoint-csom/jj164135(v=office.15)) in the client object models +- [SocialPostCreationData](/previous-versions/office/sharepoint-visio/jj667907(v=office.15)) and [SocialDataItem](/previous-versions/office/sharepoint-visio/jj679811(v=office.15)) in the JavaScript object model - [Social feed REST API reference for SharePoint](social-feed-rest-api-reference-for-sharepoint.md) - - -- [SPSocialPostCreationData](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialPostCreationData.aspx) and [SPSocialDataItem](https://msdn.microsoft.com/library/Microsoft.Office.Server.Social.SPSocialDataItem.aspx) in the server object model - - - +- [SPSocialPostCreationData](/previous-versions/office/sharepoint-server/jj263897(v=office.15)) and [SPSocialDataItem](/previous-versions/office/sharepoint-server/jj263386(v=office.15)) in the server object model From fa4608c2db8e89fce6d27dc3e025ff60a0cb6faf Mon Sep 17 00:00:00 2001 From: Ashlesha-MSFT Date: Thu, 18 Jun 2026 11:08:24 +0530 Subject: [PATCH 4/7] Revise custom field type guidance for SharePoint Add-in --- .../custom-field-type-sharepoint-add-in.md | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/solution-guidance/custom-field-type-sharepoint-add-in.md b/docs/solution-guidance/custom-field-type-sharepoint-add-in.md index ba727e2374..37fbe03074 100644 --- a/docs/solution-guidance/custom-field-type-sharepoint-add-in.md +++ b/docs/solution-guidance/custom-field-type-sharepoint-add-in.md @@ -6,6 +6,12 @@ ms.localizationpriority: medium --- # Custom field type in the SharePoint Add-in model +> [!IMPORTANT] +> ## Legacy Content Notice +> This article is based on legacy SharePoint development (Add-ins, JSLink, FTC/Farm Solutions) and is not recommended for modern SharePoint Online. +> JSLink and SharePoint Add-in model are deprecated and not supported in modern experiences. +> Use SharePoint Framework (SPFx) for modern development instead. + ## Summary The approach you take to provide customized end user experiences is different in the new SharePoint Add-in model than it was with Full Trust Code. In a typical Full Trust Code (FTC) / Farm Solution scenario, custom field types were created with the SharePoint server-side object model code by inheriting from one of the built-in field type classes and creating a field type deployment file (XML). These components were deployed via SharePoint solutions. @@ -89,7 +95,7 @@ When you need to define a specific view for a given SharePoint field and ensure The following articles demonstrate how to set the JSLink property on a SPField. - [Using the JSLink property to change the way your field or views are rendered in SharePoint 2013 (Tobias Zimmergren)](http://zimmergren.net/technical/sp-2013-using-the-spfield-jslink-property-to-change-the-way-your-field-is-rendered-in-sharepoint-2013) -- [Using JSLink with SharePoint 2013 (MSDN Magazine)](https://msdn.microsoft.com/magazine/dn745867.aspx) +- [Using JSLink with SharePoint 2013 (MSDN Magazine)](/archive/msdn-magazine/2014/june/sharepoint-using-jslink-with-sharepoint-2013) ## Challenges with implementing client-side rendering with JavaScript files via the JSLink property @@ -121,12 +127,11 @@ As you develop custom client-side rendering components, keep in mind the followi ## Related links -- [SPField.JSLink property (MSDN API Docs)](https://msdn.microsoft.com/library/microsoft.sharepoint.spfield.jslink.aspx) +- [SPField.JSLink property (MSDN API Docs)](/previous-versions/office/sharepoint-server/jj172063(v=office.15)) - [Using the JSLink property to change the way your field or views are rendered in SharePoint 2013 (Tobias Zimmergren)](http://zimmergren.net/technical/sp-2013-using-the-spfield-jslink-property-to-change-the-way-your-field-is-rendered-in-sharepoint-2013) -- [Using JSLink with SharePoint 2013 (MSDN Magazine)](https://msdn.microsoft.com/magazine/dn745867.aspx) +- [Using JSLink with SharePoint 2013 (MSDN Magazine)](/archive/msdn-magazine/2014/june/sharepoint-using-jslink-with-sharepoint-2013) - Guidance articles at [https://aka.ms/OfficeDevPnPGuidance](https://aka.ms/OfficeDevPnPGuidance "Guidance Articles") -- References in MSDN at [https://aka.ms/OfficeDevPnPMSDN](https://aka.ms/OfficeDevPnPMSDN "References in MSDN") -- Videos at [https://aka.ms/OfficeDevPnPVideos](https://aka.ms/OfficeDevPnPVideos "Videos") +- References in Microsoft Learn: [Office 365 Development Patterns and Practices (PnP) solution guidance](/sharepoint/dev/solution-guidance/office-365-development-patterns-and-practices-solution-guidance) ## PnP samples From dde6076344c235173cf650a9dbcaa5de8f6efd20 Mon Sep 17 00:00:00 2001 From: Ashlesha-MSFT Date: Thu, 18 Jun 2026 16:13:47 +0530 Subject: [PATCH 5/7] warning fixed --- .../work-with-social-feeds-in-sharepoint.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/general-development/work-with-social-feeds-in-sharepoint.md b/docs/general-development/work-with-social-feeds-in-sharepoint.md index 24ded0a062..9ca2320aa9 100644 --- a/docs/general-development/work-with-social-feeds-in-sharepoint.md +++ b/docs/general-development/work-with-social-feeds-in-sharepoint.md @@ -70,8 +70,8 @@ Table 2 shows common programming tasks for working with social feeds and the mem |:-----|:-----| |Create an instance of the manager object in the context of the current user|CSOM: [SocialFeedManager](/previous-versions/office/sharepoint-csom/jj163796(v=office.15))
JSOM: [SocialFeedManager](/previous-versions/office/sharepoint-visio/jj642991(v=office.15))
REST: **GET** [`/_api/social.feed`](social-feed-rest-api-reference-for-sharepoint.md)
SSOM: [SPSocialFeedManager](/previous-versions/office/sharepoint-visio/jj642991(v=office.15))| |Create an instance of the manager object in the context of a particular user|CSOM: not implemented
JSOM: not implemented
REST: not implemented
SSOM: [SPSocialFeedManager](/previous-versions/office/sharepoint-server/jj264599(v=office.15))| -|Get the user for the current context|CSOM: [Owner](/previous-versions/office/sharepoint-csom/jj164750(v=office.15))
JSOM: [owner](previous-versions/office/sharepoint-visio/jj712736(v=office.15))
REST: **GET** [`/_api/social.feed/my`](social-feed-rest-api-reference-for-sharepoint.md#bk_my)
SSOM: [Owner](/previous-versions/office/sharepoint-server/jj274634(v=office.15))| -|Get the feed for the current user
(specify the feed type)|CSOM: [GetFeed](/previous-versions/office/sharepoint-csom/jj164137(v=office.15))
JSOM: [getFeed](/previous-versions/office/sharepoint-visio/jj667877(v=office.15))
REST: **GET** [`/_api/social.feed/my/Feed`](social-feed-rest-api-reference-for-sharepoint.md#bk_myFeed) (personal feed.md), [`/_api/social.feed/my/News`](social-feed-rest-api-reference-for-sharepoint.md#bk_myNews), [`/_api/social.feed/my/TimelineFeed`](social-feed-rest-api-reference-for-sharepoint.md#bk_myTimelineFeed), or [`/_api/social.feed/my/Likes`](social-feed-rest-api-reference-for-sharepoint.md#bk_myLikes)
SSOM: [GetFeed](//previous-versions/office/sharepoint-server/jj265366(v=office.15))| +|Get the user for the current context|CSOM: [Owner](/previous-versions/office/sharepoint-csom/jj164750(v=office.15))
JSOM: [owner](/previous-versions/office/sharepoint-visio/jj712736(v=office.15))
REST: **GET** [`/_api/social.feed/my`](social-feed-rest-api-reference-for-sharepoint.md#bk_my)
SSOM: [Owner](/previous-versions/office/sharepoint-server/jj274634(v=office.15))| +|Get the feed for the current user
(specify the feed type)|CSOM: [GetFeed](/previous-versions/office/sharepoint-csom/jj164137(v=office.15))
JSOM: [getFeed](/previous-versions/office/sharepoint-visio/jj667877(v=office.15))
REST: **GET** [`/_api/social.feed/my/Feed`](social-feed-rest-api-reference-for-sharepoint.md#bk_myFeed) (personal feed.md), [`/_api/social.feed/my/News`](social-feed-rest-api-reference-for-sharepoint.md#bk_myNews), [`/_api/social.feed/my/TimelineFeed`](social-feed-rest-api-reference-for-sharepoint.md#bk_myTimelineFeed), or [`/_api/social.feed/my/Likes`](social-feed-rest-api-reference-for-sharepoint.md#bk_myLikes)
SSOM: [GetFeed](/previous-versions/office/sharepoint-server/jj265366(v=office.15))| |Get the personal feed for a particular user|CSOM: [GetFeedFor](/previous-versions/office/sharepoint-csom/jj164252(v=office.15))
JSOM: [getFeedFor](/previous-versions/office/sharepoint-visio/jj712749(v=office.15))
REST: **GET** [`/_api/social.feed/actor(item='domain\\user')/Feed`](social-feed-rest-api-reference-for-sharepoint.md#bk_actorFeed)
SSOM: [GetFeedFor](/previous-versions/office/sharepoint-server/jj264479(v=office.15))| |Get the site feed for a team site
(specify the URL of the site feed as the actor (example: http://\/\/newsfeed.aspx))|CSOM: [GetFeedFor](/previous-versions/office/sharepoint-csom/jj164252(v=office.15))
JSOM: [getFeedFor](/previous-versions/office/sharepoint-visio/jj712749(v=office.15))
REST: **GET** [`/_api/social.feed/actor(item=@v)/Feed?@v='http:////newsfeed.aspx'`](social-feed-rest-api-reference-for-sharepoint.md#bk_actorFeed)
SSOM: [GetFeedFor](/previous-versions/office/sharepoint-server/jj264479(v=office.15))| |Publish a root post to the current user's feed
(specify **null** for the target)|CSOM: [CreatePost](/previous-versions/office/sharepoint-csom/jj164528(v=office.15))
JSOM: [createPost](/previous-versions/office/sharepoint-visio/jj667802(v=office.15))
REST: **POST** [`/_api/social.feed/my/Feed/Post`](social-feed-rest-api-reference-for-sharepoint.md#bk_myFeedPost) and pass the _restCreationData_ parameter in the request body
SSOM: [CreatePost](/previous-versions/office/sharepoint-server/jj263426(v=office.15))| From efb5951805feacaa9974c029939b1934e1f1d053 Mon Sep 17 00:00:00 2001 From: Ashlesha-MSFT Date: Thu, 18 Jun 2026 16:17:34 +0530 Subject: [PATCH 6/7] fixed link warning --- docs/solution-guidance/custom-field-type-sharepoint-add-in.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/solution-guidance/custom-field-type-sharepoint-add-in.md b/docs/solution-guidance/custom-field-type-sharepoint-add-in.md index 37fbe03074..cd78fdfb20 100644 --- a/docs/solution-guidance/custom-field-type-sharepoint-add-in.md +++ b/docs/solution-guidance/custom-field-type-sharepoint-add-in.md @@ -94,8 +94,7 @@ When you need to define a specific view for a given SharePoint field and ensure The following articles demonstrate how to set the JSLink property on a SPField. -- [Using the JSLink property to change the way your field or views are rendered in SharePoint 2013 (Tobias Zimmergren)](http://zimmergren.net/technical/sp-2013-using-the-spfield-jslink-property-to-change-the-way-your-field-is-rendered-in-sharepoint-2013) -- [Using JSLink with SharePoint 2013 (MSDN Magazine)](/archive/msdn-magazine/2014/june/sharepoint-using-jslink-with-sharepoint-2013) +- [SharePoint : Using JSLink with SharePoint 2013](/archive/msdn-magazine/2014/june/sharepoint-using-jslink-with-sharepoint-2013) ## Challenges with implementing client-side rendering with JavaScript files via the JSLink property @@ -128,7 +127,6 @@ As you develop custom client-side rendering components, keep in mind the followi ## Related links - [SPField.JSLink property (MSDN API Docs)](/previous-versions/office/sharepoint-server/jj172063(v=office.15)) -- [Using the JSLink property to change the way your field or views are rendered in SharePoint 2013 (Tobias Zimmergren)](http://zimmergren.net/technical/sp-2013-using-the-spfield-jslink-property-to-change-the-way-your-field-is-rendered-in-sharepoint-2013) - [Using JSLink with SharePoint 2013 (MSDN Magazine)](/archive/msdn-magazine/2014/june/sharepoint-using-jslink-with-sharepoint-2013) - Guidance articles at [https://aka.ms/OfficeDevPnPGuidance](https://aka.ms/OfficeDevPnPGuidance "Guidance Articles") - References in Microsoft Learn: [Office 365 Development Patterns and Practices (PnP) solution guidance](/sharepoint/dev/solution-guidance/office-365-development-patterns-and-practices-solution-guidance) From b4e6279aa1be7404f5bac0e516bf4a98559fff5c Mon Sep 17 00:00:00 2001 From: Ashlesha-MSFT Date: Thu, 18 Jun 2026 17:35:09 +0530 Subject: [PATCH 7/7] Revise SharePoint client object model documentation Updated the document to include a note about BCS support in SharePoint Online and revised the content for clarity. --- ...-model-with-external-data-in-sharepoint.md | 91 +++---------------- 1 file changed, 15 insertions(+), 76 deletions(-) diff --git a/docs/general-development/get-started-using-the-client-object-model-with-external-data-in-sharepoint.md b/docs/general-development/get-started-using-the-client-object-model-with-external-data-in-sharepoint.md index b6fe3360a5..5321abf5da 100644 --- a/docs/general-development/get-started-using-the-client-object-model-with-external-data-in-sharepoint.md +++ b/docs/general-development/get-started-using-the-client-object-model-with-external-data-in-sharepoint.md @@ -11,94 +11,63 @@ Learn how to use the SharePoint client object model to work with Business Connec ## What is the SharePoint client object model? +> [!NOTE] +> Business Connectivity Services (BCS) is primarily supported in SharePoint Server environments. In SharePoint Online, external data scenarios are typically implemented using Microsoft Graph, REST APIs, or Power Platform solutions. While the SharePoint Client-Side Object Model (CSOM) is still supported, it is considered a legacy approach for new cloud development scenarios. + The client object model for SharePoint is a set of client-based libraries that represent the server object model. They are packaged in three different DLLs to accommodate a variety of development types. The client object model includes most of the major functions of the server API. This allows access to the same types of functionality from browser scripting and also .NET web applications and Silverlight applications.
To enhance and expand the capabilities for working with external data, Business Connectivity Services (BCS) has expanded the client object model to include additional functionality.
-Get set up   Get to work   Learn more

+Get set up   Get to work   Learn more ## Get started using the SharePoint client object model with external data To develop solutions using the SharePoint client object model (CSOM), you will need the following: - - - - SharePoint - - - Visual Studio 2012 - - - Office Developer Tools for Visual Studio 2012 - For information about how to set up your development environment, see [Setting up a development environment for BCS in SharePoint](setting-up-a-development-environment-for-bcs-in-sharepoint.md). - - To access the capabilities provided by the client object model, you need only to add references to the **Microsoft.SharePoint.Client.Runtime.dll** and **Microsoft.SharePoint.Client.dll** files in their projects. You can also use the client object model by referencing the following DLLs in the global assembly cache: - - - - `\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\15\\isapi\\Microsoft.SharePoint.Client.Runtime.dll` - - - `\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\15\\isapi\\Microsoft.SharePoint.Client.dll` - - - + ### SharePoint client object model essentials The following articles will help you understand more about the client object model in SharePoint. - - - **Table 1. Core concepts for understanding the client object model** - |**Article**|**Description**| |:-----|:-----| | [External content types in SharePoint](external-content-types-in-sharepoint.md)
|Learn what you can do with external content types and what you need to start creating them in SharePoint.
| | [Using OData sources with Business Connectivity Services in SharePoint](using-odata-sources-with-business-connectivity-services-in-sharepoint.md)
|Provides information to help get started creating external content types based on OData sources and using that data in SharePoint or Office 2013 components.
| | [Choose the right API set in SharePoint](choose-the-right-api-set-in-sharepoint.md)
|Learn about the several sets of APIs that are provided in SharePoint, including the server object model, the various client object models, and the REST/OData web service.
| -| [.NET client API reference for SharePoint Online](https://msdn.microsoft.com/library/88e5e1b9-eab2-4f3b-a3f2-75c96b86f1f4%28Office.15%29.aspx)
|Find information about the .NET client class libraries in SharePoint.
| -| [JavaScript API reference for SharePoint](https://msdn.microsoft.com/library/1ead2f8d-a541-4a50-89fa-f195f2ba14e5%28Office.15%29.aspx)
|Find information about the JavaScript object libraries in SharePoint.
| +| [.NET client API reference for SharePoint Online](/previous-versions/office/sharepoint-csom/jj193041(v=office.15))
|Find information about the .NET client class libraries in SharePoint.
| +| [JavaScript API reference for SharePoint](/previous-versions/office/sharepoint-visio/jj193034(v=office.15))
|Find information about the JavaScript object libraries in SharePoint.
| - ## What can you do with the client object model? You can use the SharePoint client object model to retrieve, update, and manage data that is contained in SharePoint. SharePoint offers the client libraries in different formats to accommodate most developers. For web developers who are using scripting languages, the client library is offered in JavaScript. For .NET developers, it is offered as a .NET client managed DLL. For developers of Silverlight applications, the client library is provided by a Silverlight DLL. - - See the articles in Table 2 for more information about what you can do with the client object model in SharePoint. - - - - + **Table 2. Basic tasks for using the client object model with external data** - |**Task**|**Description**| |:-----|:-----| -| [Complete basic operations using SharePoint client library code](https://msdn.microsoft.com/library/5a69c9e3-73bf-4ed5-bc19-182056bdb394%28Office.15%29.aspx)
|Learn how to write code to perform basic operations with the SharePoint client object model.
| +| [Complete basic operations using SharePoint client library code](/sharepoint/dev/sp-add-ins/complete-basic-operations-using-sharepoint-client-library-code)
|Learn how to write code to perform basic operations with the SharePoint client object model.
| | [How to: Use the client code library to access external data in SharePoint](how-to-use-the-client-code-library-to-access-external-data-in-sharepoint.md)
|Learn how to use the SharePoint client object model to work with SharePoint BCS objects using browser-based scripting.
| The following are some basic examples of tasks you can accomplish using CSOM. - - - - + ### Get a specific entity This example shows how to get context from SharePoint, and then retrieve a specified data source entity. - - - - + ```csharp ClientContext ctx = new ClientContext("http://sharepointservername"); @@ -109,14 +78,10 @@ ctx.Load(entity); ctx.ExecuteQuery(); ``` - ### Create a generic invoker This example shows how to write a generic invoker so that you can create an entity object to work within your code. - - - - + ```csharp LobSystem lobSystem = entity.GetLobSystem(); ctx.Load(lobSystem); @@ -143,13 +108,9 @@ if (null != lsi) ``` - ### Retrieve paged result sets The following example shows how to retrieve a filtered, paged dataset. In this case, the page value is 50. - - - ```csharp @@ -168,13 +129,9 @@ ctx.ExecuteQuery(); ``` - ### Query for filtered information -The following example demonstrates how to return a filtered result set. In this case, the data column filtered is the **X.Y.Z.Country** field. The code looks for anything with the value of "India", and then puts that into a collection. - - - +The following example demonstrates how to return a filtered result set. In this case, the data column filtered is the **X.Y.Z.Country** field. The code looks for anything with the value of "India", and then puts that into a collection. ```csharp @@ -191,39 +148,21 @@ ctx.ExecuteQuery(); ``` - ## Beyond the basics: Learn more about the client object model For more information about using the client object model in SharePoint, see the information in Table 3. - - - **Table 3. Advanced concepts for the client object model** - |**Article**|**Description**| |:-----|:-----| | [BCS client object model reference for SharePoint](bcs-client-object-model-reference-for-sharepoint.md)
|Summarizes the objects available for creating client-side scripts using the SharePoint client object model to access external data exposed by BCS.
| - ## See also - - [Business Connectivity Services in SharePoint](business-connectivity-services-in-sharepoint.md) - - -- [SharePoint Add-ins](https://msdn.microsoft.com/library/cd1eda9e-8e54-4223-93a9-a6ea0d18df70%28Office.15%29.aspx) - - +- [SharePoint Add-ins](/sharepoint/dev/sp-add-ins/sharepoint-add-ins) - [How to: Use the client code library to access external data in SharePoint](how-to-use-the-client-code-library-to-access-external-data-in-sharepoint.md) - - -- [Complete basic operations using SharePoint client library code](https://msdn.microsoft.com/library/5a69c9e3-73bf-4ed5-bc19-182056bdb394%28Office.15%29.aspx) - - -- [SharePoint: Access complex external content types with CSOM](https://code.msdn.microsoft.com/office/SharePoint-2013-Accessing-ccbc24cf) - - +- [Complete basic operations using SharePoint client library code](/sharepoint/dev/sp-add-ins/complete-basic-operations-using-sharepoint-client-library-code)