public interface PageOperations
| Modifier and Type | Method and Description |
|---|---|
PagedList<Account> |
getAccounts()
Retrieves a list of Account objects for the pages that the authenticated user is an administrator.
|
Page |
getPage(String pageId)
Retrieves data for a page.
|
boolean |
isPageAdmin(String pageId)
Checks whether the logged-in user for this session is an admin of the page with the given page ID.
|
String |
post(String pageId,
String message)
Posts a message to a page's feed as a page administrator.
|
String |
post(String pageId,
String message,
FacebookLink link)
Posts a link to the page's feed as a page administrator.
|
String |
postPhoto(String pageId,
String albumId,
Resource photo)
Posts a photo to a page's album as the page administrator.
|
String |
postPhoto(String pageId,
String albumId,
Resource photo,
String caption)
Posts a photo to a page's album as the page administrator.
|
PagedList<Page> |
search(String query,
double latitude,
double longitude,
long distance)
Searches for pages for places near a given coordinate.
|
Page getPage(String pageId)
pageId - the page ID.Pageboolean isPageAdmin(String pageId)
pageId - the page IDorg.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the user has not granted "manage_pages" permission.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.PagedList<Account> getAccounts()
String post(String pageId, String message)
FeedOperations.post(String, String) instead.pageId - the page IDmessage - the message to postorg.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the user has not granted "manage_pages" permission.PageAdministrationException - if the user is not a page administrator.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.String post(String pageId, String message, FacebookLink link)
FeedOperations.postLink(String, String, FacebookLink) instead.pageId - the page IDmessage - a message to send with the link.link - the link detailsorg.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the user has not granted "manage_pages" permission.PageAdministrationException - if the user is not a page administrator.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.String postPhoto(String pageId, String albumId, Resource photo)
pageId - the page IDalbumId - the album IDphoto - A Resource for the photo data. The given Resource must implement the getFilename() method (such as FileSystemResource or ClassPathResource).org.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the user has not granted "manage_pages" permission.PageAdministrationException - if the user is not a page administrator.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.String postPhoto(String pageId, String albumId, Resource photo, String caption)
pageId - the page IDalbumId - the album IDphoto - A Resource for the photo data. The given Resource must implement the getFilename() method (such as FileSystemResource or ClassPathResource).caption - A caption describing the photo.org.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the user has not granted "manage_pages" permission.PageAdministrationException - if the user is not a page administrator.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.PagedList<Page> search(String query, double latitude, double longitude, long distance)
query - the search query (e.g., "Burritos")latitude - the latitude of the point to search nearlongitude - the longitude of the point to search neardistance - the radius to search within (in feet)Pages matching the searchorg.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.