Forum Discussion
Maggan Wåhlin
Nov 23, 2017Iron Contributor
Enable Likes in modern page comments
I´m working on an SPFx web part to show aggregated comments made within a site. I am able to get all info about a comment through REST:
https://xxx.sharepoint.com/sites/vmf-lab/_api/web/lists('...
Maggan Wåhlin
Nov 23, 2017Iron Contributor
Thank you Pieter Veenstra.
I just pasted the REST-call above in Postman to get all comment properties. Works fine. Just surprising that there is a property named likeCount, when it isn´t possible to like a comment :-)
<?xml version="1.0" encoding="utf-8"?>
<feed xml:base="https://xxx.sharepoint.com/sites/lab/_api/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
<id>8bef73cd-dfcc-40e4-938a-2f1b763b6ff8</id>
<title />
<updated>2017-11-23T13:22:58Z</updated>
<entry>
<id>https://xxx.sharepoint.com/sites/lab/_api/web/lists('6c0a16c3-c8d8-47ce-81f5-ba7893d00d0c')/GetItemById(33)/Comments(2)</id>
<category term="Microsoft.SharePoint.Comments.comment" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
<link rel="edit" href="https://xxx.sharepoint.com/sites/lab/_api/web/lists('6c0a16c3-c8d8-47ce-81f5-ba7893d00d0c')/GetItemById(33)/Comments(2)" />
<title />
<updated>2017-11-23T13:22:58Z</updated>
<author>
<name />
</author>
<content type="application/xml">
<m:properties>
<d:author m:type="SP.Sharing.Principal">
<d:email>Maggan.Wahlin@teknikhuset.se</d:email>
<d:id m:type="Edm.Int32">68</d:id>
<d:isActive m:type="Edm.Boolean">true</d:isActive>
<d:isExternal m:type="Edm.Boolean">false</d:isExternal>
<d:jobTitle m:null="true" />
<d:loginName>i:0#.f|membership|mawah@teknikhuset.se</d:loginName>
<d:name>Maggan Wåhlin</d:name>
<d:principalType m:type="Edm.Int32">1</d:principalType>
<d:userId m:null="true" />
</d:author>
<d:createdDate m:type="Edm.DateTime">2017-11-22T09:02:48Z</d:createdDate>
<d:likeCount m:type="Edm.Int32">0</d:likeCount>
<d:replyCount m:type="Edm.Int32">1</d:replyCount>
<d:text>Trying out the comment-function</d:text>
</m:properties>
</content>
</entry>
</feed>
Well, I guess good things happen to those who wait :-)
Nov 23, 2017
indeed, I found the same when I tried the REST call. The likeCount is always set to 0 and the interface doesn't have an option to change it.
I wonder if it is possible to update the likeCount through the API.