diff --git a/docs/sp/comments-likes.md b/docs/sp/comments-likes.md index 5abad7a87..3cd754a52 100644 --- a/docs/sp/comments-likes.md +++ b/docs/sp/comments-likes.md @@ -252,7 +252,7 @@ await item.like(); // unlike an item await item.unlike(); -// get the liked by information +// ⚠️ getLikedByInformation is deprecated for Items, as the SharePoint REST API no longer works for regular list items. Will continue to work for pages & comments. const likedByInfo: ILikedByInformation = await item.getLikedByInformation(); ``` diff --git a/packages/sp/comments/item.ts b/packages/sp/comments/item.ts index f81109471..059f8c3ea 100644 --- a/packages/sp/comments/item.ts +++ b/packages/sp/comments/item.ts @@ -63,6 +63,9 @@ _Item.prototype.unlike = async function (this: _Item) { return spPost(SPQueryable([this, likeUrl])); }; +/** +* @deprecated This method is deprecated as this navigation property does not work in the Microsoft SharePoint REST API. +*/ _Item.prototype.getLikedByInformation = function (this: _Item): Promise { return Item(this, "likedByInformation").expand("likedby")(); };