0
votes

I want to get data of the comments on a google site page.

I found an appropriate method "getComments", but it has already been deprecated. (I tried to use it, but it did not work. Return no array) https://developers.google.com/apps-script/reference/sites/page#getcomments

Does anyone know the good way to get the comments from a page? I just want to make a kind of "user comment ranking" from some pages.

Thanks.

1

1 Answers

0
votes

You may want to check the Comment Class then the getContent() method which returns the content of this comment as a String.

var pages = SitesApp.getSite('example.com', 'mysite').getChildren();
var comments = pages[0].getComments();
var content = comments[0].getContent()