facebook4j.api
Interface PostMethods

All Known Subinterfaces:
Facebook

public interface PostMethods

Author:
Ryuji Yamashita - roundrop at gmail.com

Method Summary
 String commentPost(String postId, CommentUpdate commentUpdate)
          Comments on the post.
 String commentPost(String postId, String message)
          Comments on the post.
 boolean deletePost(String postId)
          Deletes the post.
 ResponseList<Post> getFeed()
          Returns the current user's/page's/event's wall.
 ResponseList<Post> getFeed(Reading reading)
          Returns the current user's/page's/event's wall.
 ResponseList<Post> getFeed(String id)
          Returns a user's/page's/event's wall.
 ResponseList<Post> getFeed(String id, Reading reading)
          Returns a user's/page's/event's wall.
 ResponseList<Post> getHome()
          Returns the current user's news feed.
 ResponseList<Post> getHome(Reading reading)
          Returns the current user's news feed.
 Post getPost(String postId)
          Returns a single post.
 Post getPost(String postId, Reading reading)
          Returns a single post.
 ResponseList<Comment> getPostComments(String postId)
          Returns all of the comments on a post.
 ResponseList<Comment> getPostComments(String postId, Reading reading)
          Returns all of the comments on a post.
 ResponseList<Like> getPostLikes(String postId)
          Returns the likes on a post.
 ResponseList<Like> getPostLikes(String postId, Reading reading)
          Returns the likes on a post.
 ResponseList<Reaction> getPostReactions(String postId)
          Returns the reactions on a post.
 ResponseList<Reaction> getPostReactions(String postId, Reading reading)
          Returns the reactions on a post.
 ResponseList<Post> getPosts()
          Returns the current user's/page's own posts.
 ResponseList<Post> getPosts(Reading reading)
          Returns the current user's/page's own posts.
 ResponseList<Post> getPosts(String id)
          Returns the user's/page's own posts.
 ResponseList<Post> getPosts(String id, Reading reading)
          Returns the user's/page's own posts.
 ResponseList<Post> getSharedPosts(String postId)
          Returns the posts in which this post is shared.
 ResponseList<Post> getSharedPosts(String postId, Reading reading)
          Returns the posts in which this post is shared.
 ResponseList<Post> getStatuses()
          Returns the current user's status updates.
 ResponseList<Post> getStatuses(Reading reading)
          Returns the current user's status updates.
 ResponseList<Post> getStatuses(String id)
          Returns the user's/page's status updates.
 ResponseList<Post> getStatuses(String id, Reading reading)
          Returns the user's/page's status updates.
 ResponseList<Post> getTagged()
          Returns the posts the current user is tagged in.
 ResponseList<Post> getTagged(Reading reading)
          Returns the posts the current user is tagged in.
 ResponseList<Post> getTagged(String userId)
          Returns the posts a user is tagged in.
 ResponseList<Post> getTagged(String userId, Reading reading)
          Returns the posts the user is tagged in.
 boolean likePost(String postId)
          Likes the post.
 String postFeed(PostUpdate postUpdate)
          Creates the post.
 String postFeed(String id, PostUpdate postUpdate)
          Creates the post.
 String postLink(String userId, URL link)
          Creates the link.
 String postLink(String userId, URL link, String message)
          Creates the link.
 String postLink(URL link)
          Creates the link.
 String postLink(URL link, String message)
          Creates the link.
 String postStatusMessage(String message)
          Creates the status message.
 String postStatusMessage(String id, String message)
          Creates the status message.
 boolean unlikePost(String postId)
          Unlikes the post.
 

Method Detail

getFeed

ResponseList<Post> getFeed()
                           throws FacebookException
Returns the current user's/page's/event's wall.

Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#feed - Facebook Developers

getFeed

ResponseList<Post> getFeed(Reading reading)
                           throws FacebookException
Returns the current user's/page's/event's wall.

Parameters:
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#feed - Facebook Developers

getFeed

ResponseList<Post> getFeed(String id)
                           throws FacebookException
Returns a user's/page's/event's wall.

Parameters:
id - the ID of a user/page/event
Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#feed - Facebook Developers

getFeed

ResponseList<Post> getFeed(String id,
                           Reading reading)
                           throws FacebookException
Returns a user's/page's/event's wall.

Parameters:
id - the ID of a user/page/event
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#feed - Facebook Developers

getHome

ResponseList<Post> getHome()
                           throws FacebookException
Returns the current user's news feed.

Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#home - Facebook Developers

getHome

ResponseList<Post> getHome(Reading reading)
                           throws FacebookException
Returns the current user's news feed.

Parameters:
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#home - Facebook Developers

getPosts

ResponseList<Post> getPosts()
                            throws FacebookException
Returns the current user's/page's own posts.

Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#posts - Facebook Developers

getPosts

ResponseList<Post> getPosts(Reading reading)
                            throws FacebookException
Returns the current user's/page's own posts.

Parameters:
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#posts - Facebook Developers

getPosts

ResponseList<Post> getPosts(String id)
                            throws FacebookException
Returns the user's/page's own posts.

Parameters:
id - the ID of a user/page
Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#posts - Facebook Developers

getPosts

ResponseList<Post> getPosts(String id,
                            Reading reading)
                            throws FacebookException
Returns the user's/page's own posts.

Parameters:
id - the ID of a user/page
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#posts - Facebook Developers

getStatuses

ResponseList<Post> getStatuses()
                               throws FacebookException
Returns the current user's status updates.

Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#statuses - Facebook Developers

getStatuses

ResponseList<Post> getStatuses(Reading reading)
                               throws FacebookException
Returns the current user's status updates.

Parameters:
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#statuses - Facebook Developers

getStatuses

ResponseList<Post> getStatuses(String id)
                               throws FacebookException
Returns the user's/page's status updates.

Parameters:
id - the ID of a user/page
Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#statuses - Facebook Developers

getStatuses

ResponseList<Post> getStatuses(String id,
                               Reading reading)
                               throws FacebookException
Returns the user's/page's status updates.

Parameters:
id - the ID of a user/page
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#statuses - Facebook Developers

getTagged

ResponseList<Post> getTagged()
                             throws FacebookException
Returns the posts the current user is tagged in.

Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User - Facebook Developers - Connections - tagged

getTagged

ResponseList<Post> getTagged(Reading reading)
                             throws FacebookException
Returns the posts the current user is tagged in.

Parameters:
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User - Facebook Developers - Connections - tagged

getTagged

ResponseList<Post> getTagged(String userId)
                             throws FacebookException
Returns the posts a user is tagged in.

Parameters:
userId - the ID of a user
Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User - Facebook Developers - Connections - tagged

getTagged

ResponseList<Post> getTagged(String userId,
                             Reading reading)
                             throws FacebookException
Returns the posts the user is tagged in.

Parameters:
userId - the ID of a user
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User - Facebook Developers - Connections - tagged

getPost

Post getPost(String postId)
             throws FacebookException
Returns a single post.

Parameters:
postId - the ID of the post
Returns:
post
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Post - Facebook Developers

getPost

Post getPost(String postId,
             Reading reading)
             throws FacebookException
Returns a single post.

Parameters:
postId - the ID of the post
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
post
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Post - Facebook Developers

getPostComments

ResponseList<Comment> getPostComments(String postId)
                                      throws FacebookException
Returns all of the comments on a post.

Parameters:
postId - the ID of a post
Returns:
comments
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Post#comments - Facebook Developers

getPostComments

ResponseList<Comment> getPostComments(String postId,
                                      Reading reading)
                                      throws FacebookException
Returns all of the comments on a post.

Parameters:
postId - the ID of a post
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
comments
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Post#comments - Facebook Developers

commentPost

String commentPost(String postId,
                   String message)
                   throws FacebookException
Comments on the post.

Parameters:
postId - the ID of the post
message - comment text
Returns:
The new comment ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Post#comments - Facebook Developers

commentPost

String commentPost(String postId,
                   CommentUpdate commentUpdate)
                   throws FacebookException
Comments on the post.

Parameters:
postId - the ID of the post
commentUpdate - comment content
Returns:
The new comment ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Post#comments - Facebook Developers

getPostLikes

ResponseList<Like> getPostLikes(String postId)
                                throws FacebookException
Returns the likes on a post.

Parameters:
postId - the ID of a post
Returns:
likes
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Post#likes - Facebook Developers

getPostLikes

ResponseList<Like> getPostLikes(String postId,
                                Reading reading)
                                throws FacebookException
Returns the likes on a post.

Parameters:
postId - the ID of a post
reading - optional reading parameters. see Graph API#reading - Facebook Developers see Graph API#reading - Facebook Developers
Returns:
likes
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Post#likes - Facebook Developers

getSharedPosts

ResponseList<Post> getSharedPosts(String postId)
                                  throws FacebookException
Returns the posts in which this post is shared.

Parameters:
postId - the ID of a post
Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
sharedposts - Facebook Developers

getSharedPosts

ResponseList<Post> getSharedPosts(String postId,
                                  Reading reading)
                                  throws FacebookException
Returns the posts in which this post is shared.

Parameters:
postId - the ID of a post
reading - optional reading parameters. see Graph API#reading - Facebook Developers see Graph API#reading - Facebook Developers
Returns:
posts
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
sharedposts - Facebook Developers

likePost

boolean likePost(String postId)
                 throws FacebookException
Likes the post.

Parameters:
postId - the ID of the post
Returns:
true if like is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Post#likes - Facebook Developers

unlikePost

boolean unlikePost(String postId)
                   throws FacebookException
Unlikes the post.

Parameters:
postId - the ID of the post
Returns:
true if unlike is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Post#likes - Facebook Developers

postFeed

String postFeed(PostUpdate postUpdate)
                throws FacebookException
Creates the post.

Parameters:
postUpdate - the post to be created
Returns:
The new post ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#posts - Facebook Developers

postFeed

String postFeed(String id,
                PostUpdate postUpdate)
                throws FacebookException
Creates the post.

Parameters:
id - the ID of a user/page/event
postUpdate - the post to be created
Returns:
The new post ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#posts - Facebook Developers

postLink

String postLink(URL link)
                throws FacebookException
Creates the link.

Parameters:
link - link URL
Returns:
The new link ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#links - Facebook Developers

postLink

String postLink(URL link,
                String message)
                throws FacebookException
Creates the link.

Parameters:
link - link URL
message - link message
Returns:
The new link ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#links - Facebook Developers

postLink

String postLink(String userId,
                URL link)
                throws FacebookException
Creates the link.

Parameters:
userId - the ID of a user
link - link URL
Returns:
The new link ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#links - Facebook Developers

postLink

String postLink(String userId,
                URL link,
                String message)
                throws FacebookException
Creates the link.

Parameters:
userId - the ID of a user
link - link URL
message - link message
Returns:
The new link ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#links - Facebook Developers

postStatusMessage

String postStatusMessage(String message)
                         throws FacebookException
Creates the status message.

Parameters:
message - link message
Returns:
The new status message ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#statuses - Facebook Developers, Page#statuses - Facebook Developers

postStatusMessage

String postStatusMessage(String id,
                         String message)
                         throws FacebookException
Creates the status message.

Parameters:
id - the ID of a user/page
message - link message
Returns:
The new status message ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#statuses - Facebook Developers, Page#statuses - Facebook Developers

deletePost

boolean deletePost(String postId)
                   throws FacebookException
Deletes the post.

Parameters:
postId - the ID of the post
Returns:
true if delete is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Post - Facebook Developers

getPostReactions

ResponseList<Reaction> getPostReactions(String postId)
                                        throws FacebookException
Returns the reactions on a post.

Parameters:
postId - the ID of the post
Returns:
reactions
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Reactions - Facebook Developers

getPostReactions

ResponseList<Reaction> getPostReactions(String postId,
                                        Reading reading)
                                        throws FacebookException
Returns the reactions on a post.

Parameters:
postId - the ID of a post
reading - optional reading parameters. see Graph API#reading - Facebook Developers see Graph API#reading - Facebook Developers
Returns:
reactions
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Reactions - Facebook Developers


Copyright © 2019. All rights reserved.