Package com.restfb.types
Class Comment
java.lang.Object
com.restfb.types.AbstractFacebookType
com.restfb.types.FacebookType
com.restfb.types.Comment
- All Implemented Interfaces:
HasComments,HasCreatedTime,HasMessage,Serializable
Represents the Comment Graph API type.
- Since:
- 1.5
- Author:
- Mark Allen
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.restfb.types.FacebookType
FacebookType.Metadata -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMessageTag(MessageTag messageTag) Attachment (image) added to a comment.Specifies whether you can reply to this commentWhether the viewer can hide this commentWhether the viewer can like this commentThis field is returned only if the authenticated user can remove this comment.Whether the viewer can send a private reply to this comment (Page viewers only)longNumber of replies to this comment.The replies to this commentDate on which the comment was created.getFrom()User who posted the comment.Whether this comment is hidden.The number of likes on this comment.getLikes()Duplicate mapping for "likes" since FB can return it differently in different situations.Text contents of the comment.Objects tagged in the message (Users, Pages, etc.)Parent object this comment was made on.If this comment is a reply, this field returns the parent comment, otherwise no valueThe permanent static URL to the commentFor comments with private replies, gets conversation between the Page and author of the comment (Page viewers only)The reactions for this post.This field is returned only if the authenticated user likes this commentprotected voidjsonMappingCompleted(JsonMapper jsonMapper) Post-JSON-mapping operation that populates themessageTagsfield "by hand".voidremoveMessageTag(MessageTag messageTag) voidsetAttachment(StoryAttachment attachment) Attachment (image) added to a comment.voidsetCanComment(Boolean canComment) Specifies whether you can reply to this commentvoidsetCanHide(Boolean canHide) Whether the viewer can hide this commentvoidsetCanLike(Boolean canLike) Whether the viewer can like this commentvoidsetCanRemove(Boolean canRemove) This field is returned only if the authenticated user can remove this comment.voidsetCanReplyPrivately(Boolean canReplyPrivately) Whether the viewer can send a private reply to this comment (Page viewers only)voidsetCommentCount(long commentCount) Number of replies to this comment.voidsetComments(Comments comments) The replies to this commentvoidsetCreatedTime(Date createdTime) Date on which the comment was created.voidUser who posted the comment.voidsetIsHidden(Boolean isHidden) Whether this comment is hidden.voidsetLikeCount(Long likeCount) The number of likes on this comment.voidDuplicate mapping for "likes" since FB can return it differently in different situations.voidsetMessage(String message) Text contents of the comment.voidsetObject(NamedFacebookType object) Parent object this comment was made on.voidIf this comment is a reply, this field returns the parent comment, otherwise no valuevoidsetPermalinkUrl(String permalinkUrl) The permanent static URL to the commentvoidsetPrivateReplyConversation(Conversation privateReplyConversation) For comments with private replies, gets conversation between the Page and author of the comment (Page viewers only)voidsetReactions(Reactions reactions) The reactions for this post.voidsetUserLikes(Boolean userLikes) This field is returned only if the authenticated user likes this commentMethods inherited from class com.restfb.types.FacebookType
getId, getMetadata, getType, setId, setMetadata, setTypeMethods inherited from class com.restfb.types.AbstractFacebookType
equals, hashCode, toString
-
Constructor Details
-
Comment
public Comment()
-
-
Method Details
-
jsonMappingCompleted
Post-JSON-mapping operation that populates themessageTagsfield "by hand".- Parameters:
jsonMapper- TheJsonMapperthat was used to map to this type.
-
getMessageTags
Objects tagged in the message (Users, Pages, etc.)- Returns:
- Objects tagged in the message (Users, Pages, etc.)
- Since:
- 1.6.10
-
addMessageTag
-
removeMessageTag
-
getFrom
User who posted the comment.- Returns:
- User who posted the comment.
-
setFrom
User who posted the comment. -
getMessage
Text contents of the comment.- Specified by:
getMessagein interfaceHasMessage- Returns:
- Text contents of the comment.
-
setMessage
Text contents of the comment. -
getCreatedTime
Date on which the comment was created.- Specified by:
getCreatedTimein interfaceHasCreatedTime- Returns:
- Date on which the comment was created.
-
setCreatedTime
Date on which the comment was created. -
getLikes
Duplicate mapping for "likes" since FB can return it differently in different situations.-- GETTER -- The likes on this post.
Sometimes this can be
null- checkgetLikeCount()instead in that case.- Returns:
- The likes on this comment.
-
setLikes
Duplicate mapping for "likes" since FB can return it differently in different situations.-- GETTER -- The likes on this post.
Sometimes this can be
null- checkgetLikeCount()instead in that case. -
getReactions
The reactions for this post.- Returns:
- The reactions for this post.
-
setReactions
The reactions for this post. -
getLikeCount
The number of likes on this comment.- Returns:
- The number of likes on this comment.
- Since:
- 1.6.10
-
setLikeCount
The number of likes on this comment.- Since:
- 1.6.10
-
getCommentCount
Number of replies to this comment.- Returns:
- Number of replies to this comment
-
setCommentCount
Number of replies to this comment. -
getCanRemove
This field is returned only if the authenticated user can remove this comment.- Returns:
- This field is returned only if the authenticated user can remove this comment.
- Since:
- 1.6.10
-
setCanRemove
This field is returned only if the authenticated user can remove this comment.- Since:
- 1.6.10
-
getUserLikes
This field is returned only if the authenticated user likes this comment- Returns:
- This field is returned only if the authenticated user likes this comment.
- Since:
- 1.6.10
-
setUserLikes
This field is returned only if the authenticated user likes this comment- Since:
- 1.6.10
-
getParent
If this comment is a reply, this field returns the parent comment, otherwise no value- Returns:
- the parent Comment
- Since:
- 1.6.13
-
setParent
If this comment is a reply, this field returns the parent comment, otherwise no value- Since:
- 1.6.13
-
getCanComment
Specifies whether you can reply to this comment- Returns:
- can_comment
- Since:
- 1.6.13
-
setCanComment
Specifies whether you can reply to this comment- Since:
- 1.6.13
-
getCanHide
Whether the viewer can hide this comment- Returns:
- can_hide
- Since:
- 1.7.1
-
setCanHide
Whether the viewer can hide this comment- Since:
- 1.7.1
-
getCanReplyPrivately
Whether the viewer can send a private reply to this comment (Page viewers only)- Returns:
- Whether the viewer can send a private reply to this comment
-
setCanReplyPrivately
Whether the viewer can send a private reply to this comment (Page viewers only) -
getPrivateReplyConversation
For comments with private replies, gets conversation between the Page and author of the comment (Page viewers only)- Returns:
- conversation between Page and author of the comment
-
setPrivateReplyConversation
For comments with private replies, gets conversation between the Page and author of the comment (Page viewers only) -
getIsHidden
Whether this comment is hidden. The original poster can still see the comment, along with the page admin and anyone else tagged in the comment- Returns:
- is_hidden
- Since:
- 1.7.1
-
setIsHidden
Whether this comment is hidden. The original poster can still see the comment, along with the page admin and anyone else tagged in the comment- Since:
- 1.7.1
-
getCanLike
Whether the viewer can like this comment- Returns:
- can_like
-
setCanLike
Whether the viewer can like this comment -
getObject
Parent object this comment was made on.- Returns:
- object
- Since:
- 1.7.1
-
setObject
Parent object this comment was made on.- Since:
- 1.7.1
-
getPermalinkUrl
The permanent static URL to the comment- Returns:
- permanent static url
-
setPermalinkUrl
The permanent static URL to the comment -
getComments
The replies to this comment- Specified by:
getCommentsin interfaceHasComments- Returns:
- replies
-
setComments
The replies to this comment -
getAttachment
Attachment (image) added to a comment.To force Facebook to fill the
attachmentfield you have to fetch the comment with thefields=attachmentparameter, otherwise the attachments arenull.- Returns:
- Attachment on the comment
-
setAttachment
Attachment (image) added to a comment.To force Facebook to fill the
attachmentfield you have to fetch the comment with thefields=attachmentparameter, otherwise the attachments arenull.
-