Class Comments
- java.lang.Object
-
- com.restfb.types.AbstractFacebookType
-
- com.restfb.types.Comments
-
- All Implemented Interfaces:
Serializable
public class Comments extends AbstractFacebookType
Represents the Comments Graph API type.Please request '{id}/comments?summary=true' explicitly if you would like the summary field which contains the count (now called 'total_count')
- Author:
- Mark Allen
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Comments()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addData(Comment comment)
Adds a commentBoolean
getCanComment()
List<Comment>
getData()
The comments.String
getOrder()
Order in which comments were returned.Long
getTotalCount()
The count of comments on this node.boolean
removeData(Comment comment)
remove a commentvoid
setCanComment(Boolean canComment)
void
setOrder(String order)
Order in which comments were returned.void
setTotalCount(Long totalCount)
The count of comments on this node.-
Methods inherited from class com.restfb.types.AbstractFacebookType
equals, hashCode, toString
-
-
-
-
Constructor Detail
-
Comments
public Comments()
-
-
Method Detail
-
addData
public boolean addData(Comment comment)
Adds a comment- Parameters:
comment
- the comment that should be added- Returns:
- true if the comment was added, false otherwise
-
removeData
public boolean removeData(Comment comment)
remove a comment- Parameters:
comment
- the comment that should be removed- Returns:
- true if the comment was removed, false otherwise
-
getTotalCount
public Long getTotalCount()
The count of comments on this node.It is important to note that this value is changed depending on the
filter
modifier being used (where comment replies are available):- if filter is
stream
then total_count will be a count of all comments (including replies) on the node. - if filter is
toplevel
then total_count will be a count of all top-level comments on the node.
total_count
can be greater than or equal to the actual number of comments returned due to privacy or deletionPlease request '{id}/comments?summary=true' explicitly if you would like the summary field which contains the count (now called 'total_count')
- Returns:
- The number of comments.
- if filter is
-
setTotalCount
public void setTotalCount(Long totalCount)
The count of comments on this node.It is important to note that this value is changed depending on the
filter
modifier being used (where comment replies are available):- if filter is
stream
then total_count will be a count of all comments (including replies) on the node. - if filter is
toplevel
then total_count will be a count of all top-level comments on the node.
total_count
can be greater than or equal to the actual number of comments returned due to privacy or deletionPlease request '{id}/comments?summary=true' explicitly if you would like the summary field which contains the count (now called 'total_count')
- if filter is
-
getOrder
public String getOrder()
Order in which comments were returned.ranked
indicates the most interesting comments are sorted first.
chronological
indicates comments are sorted by the oldest comments first.- Returns:
- the order of the comments
-
setOrder
public void setOrder(String order)
Order in which comments were returned.ranked
indicates the most interesting comments are sorted first.
chronological
indicates comments are sorted by the oldest comments first.
-
getCanComment
public Boolean getCanComment()
-
setCanComment
public void setCanComment(Boolean canComment)
-
-