Developers » API methods » Newsfeed » newsfeed.getComments
COMMENT: (1 of 8) The original translation reads "Returns data required to show comments section in user news." That did not seem clear to me, so I wrote a new description based on that for wall.getComments. Is my rewrite technically correct?Returns a list of comments in the current user's newsfeed.
This method can be called with a user token received in Standalone-app via Implicit Flow. Access rights required: wall.
countNumber of comments to return. For auto feed, you can usethe new_offset parameter returned by this method.
positive number, default 30, maximum value 100
filtersFilters to apply:
post new comments on wall posts
photo new comments on photos
video new comments on videos
topic new comments on discussions
note new comments on notes
COMMENT: (3 of 8) Is this parameter required if the reposts parameter is NOT set? If so, I want to add "(Required if reports is not set.)" That is similar language that we used elsewhere, such as in
list of comma-separated words
repostsObject ID, comments on repost of which shall be returned, e.g.wall1_45486. (If the parameter is set,the filtersparameter is optional.)
COMMENT: (4 of 7) Wow. I'm stumped at how to make this plain English. I don't understand its technical meaning so cannot fashion an edit. Mikhail, any suggestions?
start_timeEarliest timestamp (in Unix time) of a comment to return. By default, 24 hours ago.
positive number
end_timeLatest timestamp (in Unix time) of a comment to return. By default, the current time.
positive number
last_comments_countNumber of comments to each entry to return.
positive number, accessible for versions from 5.23, default 0, maximum value 10
start_fromIdentificator needed to return the next oage with results. Value for this parameter returns in next_from field.
string, accessible for versions from 5.13
fieldsAdditional fields of profiles and communities to return.
list of comma-separated words
Show options for only old API versions
fromValue obtained inthe new_fromfield from the last loaded news. It prevents duplicate news during auto feed.
string, outdated option, only for versions before 5.13
last_comments1 to return last comments on posts
flag, either 1 or 0, outdated option, only for versions before 5.23
COMMENT: (5 of 8) Compare the Results below to the Results in newsfeed.getRcommended. That other method mentions the new_offset and new_from fields, but here we don't. Shouldn't they match?-->
<!--COMMENT: (6 of 8) Are the Items an array of post objects? Can we just link out the Data Types > Wall post page instead of giving all the details here?-->
<!--COMMENT: (7 of 8) The code sample below uses Irina as the example. Should that be changed?-->
<!--COMMENT: (8 of 8) At the end of Result in newsfeed.get, there is a NOTE. Does it apply to this method also?
Returns an object containing the following fields:
  • items News array for the current user.
  • profiles Information about users in the newsfeed.
  • groups Information about communities in the newsfeed.

Items field description
Contains an array of wall objects, as well as the following fields:
  • type Type of newsfeed, based on the specified filters (e.g., post, photo).
  • source_id ID of the news source (positive number signifies a user; negative number signifies a community).
  • post_id Post ID on the owner wall.
  • photos, photo_tags, notes, friends Information about the count of objects of corresponding types (except wall posts) and up to the last 5 objects related to the current news.

Each array element in the photos and photo_tags fields contains:
  • pid Photo ID.
  • owner_id Photo owner ID.
  • aid Photo album ID.
  • src URL of the preview image.
  • src_big URL of the full-size image.

Each array element in the notes field contains:
  • nid Note ID.
  • owner_id Note owner ID.
  • title Note title.
  • ncom Number of note comments.

Each array element in the friends field contains:
  • uid User ID.

Profiles field description
Contains an array of user objects, as well as the following fields:
  • photo URL of the 50x50px user photo.
  • photo_medium_rec URL of the 100x100px user photo.

Groups field description
Contains an array of community objects with information about communities found in news.
Global errors can occur while running. See their descriptions on this page.
Version historyShow all
can_message, ban_info, can_post, can_upload_doc, can_upload_video, can_see_all_posts, can_create_topic, is_favorite, is_hidden_from_feed fields in a community object are returned for the requests including access_token only.
notifications.get method returns notifications about new market comment replies. newsfeed.getComments method returns new comments for market items. wall.get,, wall.getById methods return market_album in attachments.
Pass photo_sizes parameter to method photos.saveOwnerPhoto to get all photo sizes.

Method newsfeed.getComments parameter was changed to have an ability to limit comments count.

New ability to get possible members of event in method groups.getMembers.
Wiki page in post is returned as page object.
A new need_source parameter was added for method pages.get, source field isnt returned by default now.
New param for pagination: start_from and returning field next_from.
New error types in audio.get, video.get.
New param for pagination: start_from and returning field next_from.
Field cid changed to id in newsfeed.getComments.
new format for video object in notifications.get method.
friends.getLists list object now, list_id instead id.
board.getTopics polls in new format now.
audio.getAlbums and video.getAlbums id instead album_id.
audio.getRecommendations, friends.getSuggestions list object now.
groups.getMembers list object now.
places.getCheckins user_id instead uid in checkins objects.
In all methods that return people objects, photo, photo_medium_rec fields were renamed to photo_50, photo_100.
In wall attachment from and copy_owner fields return as user or community object, not array.
Fix photos_list attachment. (photo_list before). Some other fixes that was not implemented in api 5.0
Photos_list attach new format.
No album link in post text when album is attached.
Comments format changed, all methods returns them in the same way now
Returns comment attachments