org.springframework.social.facebook.api
Interface FeedOperations


public interface FeedOperations

Interface defining operations that can be performed on a Facebook feed.


Method Summary
 void deletePost(String id)
          Deletes a post.
 PagedList<Post> getFeed()
          Retrieves recent posts for the authenticated user.
 PagedList<Post> getFeed(int offset, int limit)
          Deprecated. Use getFeed(PagingParameters) instead.
 PagedList<Post> getFeed(PagingParameters pagedListParameters)
          Retrieves recent posts for the authenticated user.
 PagedList<Post> getFeed(String ownerId)
          Retrieves recent feed entries for a given user.
 PagedList<Post> getFeed(String ownerId, int offset, int limit)
          Deprecated. Use getFeed(String, PagingParameters) instead.
 PagedList<Post> getFeed(String ownerId, PagingParameters pagedListParameters)
          Retrieves recent feed entries for a given user.
 PagedList<Post> getHomeFeed()
          Retrieves the user's home feed.
 PagedList<Post> getHomeFeed(int offset, int limit)
          Deprecated. Use getHomeFeed(PagingParameters) instead
 PagedList<Post> getHomeFeed(PagingParameters pagedListParameters)
          Retrieves the user's home feed.
 PagedList<LinkPost> getLinks()
          Retrieves the link entries from the authenticated user's feed.
 PagedList<LinkPost> getLinks(int offset, int limit)
          Deprecated. User getLinks(PagingParameters) instead.
 PagedList<LinkPost> getLinks(PagingParameters pagedListParameters)
          Retrieves the link entries from the authenticated user's feed.
 PagedList<LinkPost> getLinks(String ownerId)
          Retrieves the link entries from the specified owner's feed.
 PagedList<LinkPost> getLinks(String ownerId, int offset, int limit)
          Deprecated. Use getLinks(String, PagingParameters) instead.
 PagedList<LinkPost> getLinks(String ownerId, PagingParameters pagedListParameters)
          Retrieves the link entries from the specified owner's feed.
 PagedList<NotePost> getNotes()
          Retrieves the note entries from the authenticated user's feed.
 PagedList<NotePost> getNotes(int offset, int limit)
          Deprecated. Use getNotes(PagingParameters) instead.
 PagedList<NotePost> getNotes(PagingParameters pagedListParameters)
          Retrieves the note entries from the authenticated user's feed.
 PagedList<NotePost> getNotes(String ownerId)
          Retrieves the note entries from the specified owner's feed.
 PagedList<NotePost> getNotes(String ownerId, int offset, int limit)
          Deprecated. Use getNotes(String, PagingParameters) instead.
 PagedList<NotePost> getNotes(String ownerId, PagingParameters pagedListParameters)
          Retrieves the note entries from the specified owner's feed.
 Post getPost(String entryId)
          Retrieves a single post.
 PagedList<Post> getPosts()
          Retrieves the post entries from the authenticated user's feed.
 PagedList<Post> getPosts(int offset, int limit)
          Deprecated. Use getPosts(PagingParameters) instead.
 PagedList<Post> getPosts(PagingParameters pagedListParameters)
          Retrieves the post entries from the authenticated user's feed.
 PagedList<Post> getPosts(String ownerId)
          Retrieves the post entries from the specified owner's feed.
 PagedList<Post> getPosts(String ownerId, int offset, int limit)
          Deprecated. Use getPosts(String, PagingParameters) instead.
 PagedList<Post> getPosts(String ownerId, PagingParameters pagedListParameters)
          Retrieves the post entries from the specified owner's feed.
 PagedList<StatusPost> getStatuses()
          Retrieves the status entries from the authenticated user's feed.
 PagedList<StatusPost> getStatuses(int offset, int limit)
          Deprecated. Use getStatuses(PagingParameters) instead.
 PagedList<StatusPost> getStatuses(PagingParameters pagedListParameters)
          Retrieves the status entries from the authenticated user's feed.
 PagedList<StatusPost> getStatuses(String userId)
          Retrieves the status entries from the specified user's feed.
 PagedList<StatusPost> getStatuses(String userId, int offset, int limit)
          Deprecated. Use getStatuses(String, PagingParameters) instead.
 PagedList<StatusPost> getStatuses(String userId, PagingParameters pagedListParameters)
          Retrieves the status entries from the specified user's feed.
 String post(PostData post)
          Adds a Post to a feed.
 String post(String ownerId, String message)
          Posts a message to a feed.
 String postLink(String message, FacebookLink link)
          Posts a link to the authenticated user's feed.
 String postLink(String ownerId, String message, FacebookLink link)
          Posts a link to a feed.
 PagedList<Post> searchHomeFeed(String query)
          Searches the authenticated user's home feed.
 PagedList<Post> searchHomeFeed(String query, int offset, int limit)
          Deprecated. Use searchHomeFeed(String, PagingParameters) instead.
 PagedList<Post> searchHomeFeed(String query, PagingParameters pagedListParameters)
          Searches the authenticated user's home feed.
 PagedList<Post> searchPublicFeed(String query)
          Searches Facebook's public feed.
 PagedList<Post> searchPublicFeed(String query, int offset, int limit)
          Deprecated. Use searchPublicFeed(String, PagingParameters) instead.
 PagedList<Post> searchPublicFeed(String query, PagingParameters pagedListParameters)
          Searches Facebook's public feed.
 PagedList<Post> searchUserFeed(String query)
          Searches the authenticated user's feed.
 PagedList<Post> searchUserFeed(String query, int offset, int limit)
          Deprecated. Use searchUserFeed(String, PagingParameters) instead
 PagedList<Post> searchUserFeed(String query, PagingParameters pagedListParameters)
          Searches the authenticated user's feed.
 PagedList<Post> searchUserFeed(String userId, String query)
          Searches a specified user's feed.
 PagedList<Post> searchUserFeed(String userId, String query, int offset, int limit)
          Deprecated. Use searchUserFeed(String, String, PagingParameters) instead.
 PagedList<Post> searchUserFeed(String userId, String query, PagingParameters pagedListParameters)
          Searches a specified user's feed.
 String updateStatus(String message)
          Posts a status update to the authenticated user's feed.
 

Method Detail

getFeed

PagedList<Post> getFeed()
Retrieves recent posts for the authenticated user. Requires "read_stream" permission to read non-public posts. Returns up to the most recent 25 posts.

Returns:
a list of Posts for the authenticated user.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getFeed

@Deprecated
PagedList<Post> getFeed(int offset,
                                   int limit)
Deprecated. Use getFeed(PagingParameters) instead.

Retrieves recent posts for the authenticated user. Requires "read_stream" permission to read non-public posts.

Parameters:
offset - the offset into the feed to start retrieving posts.
limit - the maximum number of posts to return.
Returns:
a list of Posts for the authenticated user.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getFeed

PagedList<Post> getFeed(PagingParameters pagedListParameters)
Retrieves recent posts for the authenticated user. Requires "read_stream" permission to read non-public posts.

Parameters:
pagedListParameters - the parameters defining the bounds of the list to return.
Returns:
a list of Posts for the authenticated user.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getFeed

PagedList<Post> getFeed(String ownerId)
Retrieves recent feed entries for a given user. Returns up to the most recent 25 posts. Requires "read_stream" permission to read non-public posts.

Parameters:
ownerId - the Facebook ID or alias for the owner (user, group, event, page, etc) of the feed.
Returns:
a list of Posts for the specified user.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getFeed

@Deprecated
PagedList<Post> getFeed(String ownerId,
                                   int offset,
                                   int limit)
Deprecated. Use getFeed(String, PagingParameters) instead.

Retrieves recent feed entries for a given user. Requires "read_stream" permission to read non-public posts. Returns up to the most recent 25 posts.

Parameters:
ownerId - the Facebook ID or alias for the owner (user, group, event, page, etc) of the feed.
offset - the offset into the feed to start retrieving posts.
limit - the maximum number of posts to return.
Returns:
a list of Posts for the specified user.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getFeed

PagedList<Post> getFeed(String ownerId,
                        PagingParameters pagedListParameters)
Retrieves recent feed entries for a given user. Requires "read_stream" permission to read non-public posts. Returns up to the most recent 25 posts.

Parameters:
ownerId - the Facebook ID or alias for the owner (user, group, event, page, etc) of the feed.
pagedListParameters - the parameters defining the bounds of the list to return.
Returns:
a list of Posts for the specified user.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getHomeFeed

PagedList<Post> getHomeFeed()
Retrieves the user's home feed. This includes entries from the user's friends. Returns up to the most recent 25 posts. Requires "read_stream" permission.

Returns:
a list of Posts from the authenticated user's home feed.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getHomeFeed

@Deprecated
PagedList<Post> getHomeFeed(int offset,
                                       int limit)
Deprecated. Use getHomeFeed(PagingParameters) instead

Retrieves the user's home feed. This includes entries from the user's friends. Requires "read_stream" permission.

Parameters:
offset - the offset into the feed to start retrieving posts.
limit - the maximum number of posts to return.
Returns:
a list of Posts from the authenticated user's home feed.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getHomeFeed

PagedList<Post> getHomeFeed(PagingParameters pagedListParameters)
Retrieves the user's home feed. This includes entries from the user's friends. Requires "read_stream" permission.

Parameters:
pagedListParameters - the parameters defining the bounds of the list to return.
Returns:
a list of Posts from the authenticated user's home feed.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getPost

Post getPost(String entryId)
Retrieves a single post.

Parameters:
entryId - the entry ID
Returns:
the requested Post
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.

getStatuses

PagedList<StatusPost> getStatuses()
Retrieves the status entries from the authenticated user's feed. Returns up to the most recent 25 posts.

Returns:
a list of status Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getStatuses

@Deprecated
PagedList<StatusPost> getStatuses(int offset,
                                             int limit)
Deprecated. Use getStatuses(PagingParameters) instead.

Retrieves the status entries from the authenticated user's feed.

Parameters:
offset - the offset into the feed to start retrieving posts.
limit - the maximum number of posts to return.
Returns:
a list of status Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getStatuses

PagedList<StatusPost> getStatuses(PagingParameters pagedListParameters)
Retrieves the status entries from the authenticated user's feed.

Parameters:
pagedListParameters - the parameters defining the bounds of the list to return.
Returns:
a list of status Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getStatuses

PagedList<StatusPost> getStatuses(String userId)
Retrieves the status entries from the specified user's feed. Returns up to the most recent 25 posts. Requires "read_stream" permission.

Parameters:
userId - the user's ID
Returns:
a list of status Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getStatuses

@Deprecated
PagedList<StatusPost> getStatuses(String userId,
                                             int offset,
                                             int limit)
Deprecated. Use getStatuses(String, PagingParameters) instead.

Retrieves the status entries from the specified user's feed. Requires "read_stream" permission.

Parameters:
userId - the user's ID
offset - the offset into the feed to start retrieving posts.
limit - the maximum number of posts to return.
Returns:
a list of status Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getStatuses

PagedList<StatusPost> getStatuses(String userId,
                                  PagingParameters pagedListParameters)
Retrieves the status entries from the specified user's feed. Requires "read_stream" permission.

Parameters:
userId - the user's ID
pagedListParameters - the parameters defining the bounds of the list to return.
Returns:
a list of status Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getLinks

PagedList<LinkPost> getLinks()
Retrieves the link entries from the authenticated user's feed. Returns up to the most recent 25 posts. Requires "read_stream" permission.

Returns:
a list of link Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getLinks

@Deprecated
PagedList<LinkPost> getLinks(int offset,
                                        int limit)
Deprecated. User getLinks(PagingParameters) instead.

Retrieves the link entries from the authenticated user's feed. Requires "read_stream" permission.

Parameters:
offset - the offset into the feed to start retrieving posts.
limit - the maximum number of posts to return.
Returns:
a list of link Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getLinks

PagedList<LinkPost> getLinks(PagingParameters pagedListParameters)
Retrieves the link entries from the authenticated user's feed. Requires "read_stream" permission.

Parameters:
pagedListParameters - the parameters defining the bounds of the list to return.
Returns:
a list of link Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getLinks

PagedList<LinkPost> getLinks(String ownerId)
Retrieves the link entries from the specified owner's feed. Returns up to the most recent 25 posts. Requires "read_stream" permission.

Parameters:
ownerId - the owner of the feed (could be a user, page, event, etc)
Returns:
a list of link Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getLinks

@Deprecated
PagedList<LinkPost> getLinks(String ownerId,
                                        int offset,
                                        int limit)
Deprecated. Use getLinks(String, PagingParameters) instead.

Retrieves the link entries from the specified owner's feed. Requires "read_stream" permission.

Parameters:
ownerId - the owner of the feed (could be a user, page, event, etc)
offset - the offset into the feed to start retrieving posts.
limit - the maximum number of posts to return.
Returns:
a list of link Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getLinks

PagedList<LinkPost> getLinks(String ownerId,
                             PagingParameters pagedListParameters)
Retrieves the link entries from the specified owner's feed. Requires "read_stream" permission.

Parameters:
ownerId - the owner of the feed (could be a user, page, event, etc)
pagedListParameters - the parameters defining the bounds of the list to return.
Returns:
a list of link Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getNotes

PagedList<NotePost> getNotes()
Retrieves the note entries from the authenticated user's feed. Returns up to the most recent 25 posts. Requires "read_stream" permission.

Returns:
a list of note Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getNotes

@Deprecated
PagedList<NotePost> getNotes(int offset,
                                        int limit)
Deprecated. Use getNotes(PagingParameters) instead.

Retrieves the note entries from the authenticated user's feed. Requires "read_stream" permission.

Parameters:
offset - the offset into the feed to start retrieving posts.
limit - the maximum number of posts to return.
Returns:
a list of note Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getNotes

PagedList<NotePost> getNotes(PagingParameters pagedListParameters)
Retrieves the note entries from the authenticated user's feed. Requires "read_stream" permission.

Parameters:
pagedListParameters - the parameters defining the bounds of the list to return.
Returns:
a list of note Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getNotes

PagedList<NotePost> getNotes(String ownerId)
Retrieves the note entries from the specified owner's feed. Returns up to the most recent 25 posts. Requires "read_stream" permission.

Parameters:
ownerId - the owner of the feed (could be a user, page, event, etc)
Returns:
a list of note Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getNotes

@Deprecated
PagedList<NotePost> getNotes(String ownerId,
                                        int offset,
                                        int limit)
Deprecated. Use getNotes(String, PagingParameters) instead.

Retrieves the note entries from the specified owner's feed. Requires "read_stream" permission.

Parameters:
ownerId - the owner of the feed (could be a user, page, event, etc)
offset - the offset into the feed to start retrieving posts.
limit - the maximum number of posts to return.
Returns:
a list of note Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getNotes

PagedList<NotePost> getNotes(String ownerId,
                             PagingParameters pagedListParameters)
Retrieves the note entries from the specified owner's feed. Requires "read_stream" permission.

Parameters:
ownerId - the owner of the feed (could be a user, page, event, etc)
pagedListParameters - the parameters defining the bounds of the list to return.
Returns:
a list of note Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getPosts

PagedList<Post> getPosts()
Retrieves the post entries from the authenticated user's feed. Returns up to the most recent 25 posts. Requires "read_stream" permission.

Returns:
a list of post Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getPosts

@Deprecated
PagedList<Post> getPosts(int offset,
                                    int limit)
Deprecated. Use getPosts(PagingParameters) instead.

Retrieves the post entries from the authenticated user's feed. Requires "read_stream" permission.

Parameters:
offset - the offset into the feed to start retrieving posts.
limit - the maximum number of posts to return.
Returns:
a list of post Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getPosts

PagedList<Post> getPosts(PagingParameters pagedListParameters)
Retrieves the post entries from the authenticated user's feed. Requires "read_stream" permission.

Parameters:
pagedListParameters - the parameters defining the bounds of the list to return.
Returns:
a list of post Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getPosts

PagedList<Post> getPosts(String ownerId)
Retrieves the post entries from the specified owner's feed. Returns up to the most recent 25 posts. Requires "read_stream" permission.

Parameters:
ownerId - the owner of the feed (could be a user, page, event, etc)
Returns:
a list of post Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getPosts

@Deprecated
PagedList<Post> getPosts(String ownerId,
                                    int offset,
                                    int limit)
Deprecated. Use getPosts(String, PagingParameters) instead.

Retrieves the post entries from the specified owner's feed. Requires "read_stream" permission.

Parameters:
ownerId - the owner of the feed (could be a user, page, event, etc)
offset - the offset into the feed to start retrieving posts.
limit - the maximum number of posts to return.
Returns:
a list of post Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

getPosts

PagedList<Post> getPosts(String ownerId,
                         PagingParameters pagedListParameters)
Retrieves the post entries from the specified owner's feed. Requires "read_stream" permission.

Parameters:
ownerId - the owner of the feed (could be a user, page, event, etc)
pagedListParameters - the parameters defining the bounds of the list to return.
Returns:
a list of post Posts.
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "read_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

updateStatus

String updateStatus(String message)
Posts a status update to the authenticated user's feed. Requires "publish_stream" permission.

Parameters:
message - the message to post.
Returns:
the ID of the new feed entry.
Throws:
org.springframework.social.DuplicateStatusException - if the status message duplicates a previously posted status.
org.springframework.social.RateLimitExceededException - if the per-user/per-app rate limit is exceeded.
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "publish_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

postLink

String postLink(String message,
                FacebookLink link)
Posts a link to the authenticated user's feed. Requires "publish_stream" permission.

Parameters:
message - a message to send with the link.
Returns:
the ID of the new feed entry.
Throws:
org.springframework.social.DuplicateStatusException - if the post duplicates a previous post.
org.springframework.social.RateLimitExceededException - if the per-user/per-app rate limit is exceeded.
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "publish_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

post

String post(String ownerId,
            String message)
Posts a message to a feed. Requires "publish_stream" permission.

Parameters:
ownerId - the feed owner ID. Could be a user ID or a page ID.
message - the message to post.
Returns:
the id of the new feed entry.
Throws:
org.springframework.social.DuplicateStatusException - if the post duplicates a previous post.
org.springframework.social.RateLimitExceededException - if the per-user/per-app rate limit is exceeded.
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "publish_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

post

String post(PostData post)
Adds a Post to a feed.

Parameters:
post - the new post
Returns:
the id of the new feed entry.
Throws:
org.springframework.social.DuplicateStatusException - if the post duplicates a previous post.
org.springframework.social.RateLimitExceededException - if the per-user/per-app rate limit is exceeded.
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "publish_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

postLink

String postLink(String ownerId,
                String message,
                FacebookLink link)
Posts a link to a feed. Requires "publish_stream" permission.

Parameters:
ownerId - the feed owner ID. Could be a user ID or a page ID.
message - a message to send with the link.
Returns:
the ID of the new feed entry.
Throws:
org.springframework.social.DuplicateStatusException - if the post duplicates a previous post.
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "publish_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

deletePost

void deletePost(String id)
Deletes a post. Requires "publish_stream" permission and the post must have been created by the same application.

Parameters:
id - the feed entry ID
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.InsufficientPermissionException - if the user has not granted "publish_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

searchPublicFeed

PagedList<Post> searchPublicFeed(String query)
Searches Facebook's public feed. Returns up to 25 posts that match the query.

Parameters:
query - the search query (e.g., "Dr Seuss")
Returns:
a list of Posts that match the search query
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.

searchPublicFeed

@Deprecated
PagedList<Post> searchPublicFeed(String query,
                                            int offset,
                                            int limit)
Deprecated. Use searchPublicFeed(String, PagingParameters) instead.

Searches Facebook's public feed.

Parameters:
query - the search query (e.g., "Dr Seuss")
offset - the offset into the feed to start retrieving posts.
limit - the maximum number of posts to return.
Returns:
a list of Posts that match the search query
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.

searchPublicFeed

PagedList<Post> searchPublicFeed(String query,
                                 PagingParameters pagedListParameters)
Searches Facebook's public feed.

Parameters:
query - the search query (e.g., "Dr Seuss")
pagedListParameters - the parameters defining the bounds of the list to return.
Returns:
a list of Posts that match the search query
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.

searchHomeFeed

PagedList<Post> searchHomeFeed(String query)
Searches the authenticated user's home feed. Returns up to 25 posts that match the query.

Parameters:
query - the search query (e.g., "Dr Seuss")
Returns:
a list of Posts that match the search query
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

searchHomeFeed

@Deprecated
PagedList<Post> searchHomeFeed(String query,
                                          int offset,
                                          int limit)
Deprecated. Use searchHomeFeed(String, PagingParameters) instead.

Searches the authenticated user's home feed.

Parameters:
query - the search query (e.g., "Dr Seuss")
offset - the offset into the feed to start retrieving posts.
limit - the maximum number of posts to return.
Returns:
a list of Posts that match the search query
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

searchHomeFeed

PagedList<Post> searchHomeFeed(String query,
                               PagingParameters pagedListParameters)
Searches the authenticated user's home feed.

Parameters:
query - the search query (e.g., "Dr Seuss")
pagedListParameters - the parameters defining the bounds of the list to return.
Returns:
a list of Posts that match the search query
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

searchUserFeed

PagedList<Post> searchUserFeed(String query)
Searches the authenticated user's feed. Returns up to 25 posts that match the query.

Parameters:
query - the search query (e.g., "football")
Returns:
a list of Posts that match the search query
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

searchUserFeed

@Deprecated
PagedList<Post> searchUserFeed(String query,
                                          int offset,
                                          int limit)
Deprecated. Use searchUserFeed(String, PagingParameters) instead

Searches the authenticated user's feed.

Parameters:
query - the search query (e.g., "football")
offset - the offset into the feed to start retrieving posts.
limit - the maximum number of posts to return.
Returns:
a list of Posts that match the search query
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

searchUserFeed

PagedList<Post> searchUserFeed(String query,
                               PagingParameters pagedListParameters)
Searches the authenticated user's feed.

Parameters:
query - the search query (e.g., "football")
pagedListParameters - the parameters defining the bounds of the list to return.
Returns:
a list of Posts that match the search query
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

searchUserFeed

PagedList<Post> searchUserFeed(String userId,
                               String query)
Searches a specified user's feed. Returns up to 25 posts that match the query.

Parameters:
userId - the ID of the user whose feed is to be searched
query - the search query (e.g., "football")
Returns:
a list of Posts that match the search query
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

searchUserFeed

@Deprecated
PagedList<Post> searchUserFeed(String userId,
                                          String query,
                                          int offset,
                                          int limit)
Deprecated. Use searchUserFeed(String, String, PagingParameters) instead.

Searches a specified user's feed.

Parameters:
userId - the ID of the user whose feed is to be searched
query - the search query (e.g., "football")
offset - the offset into the feed to start retrieving posts.
limit - the maximum number of posts to return.
Returns:
a list of Posts that match the search query
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.

searchUserFeed

PagedList<Post> searchUserFeed(String userId,
                               String query,
                               PagingParameters pagedListParameters)
Searches a specified user's feed.

Parameters:
userId - the ID of the user whose feed is to be searched
query - the search query (e.g., "football")
pagedListParameters - the parameters defining the bounds of the list to return.
Returns:
a list of Posts that match the search query
Throws:
org.springframework.social.ApiException - if there is an error while communicating with Facebook.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.