public interface PageOperations
| Modifier and Type | Method and Description |
|---|---|
Facebook |
facebookOperations(String pageId)
Returns a
Facebook instance that will act on behalf of the given page. |
String |
getAccessToken(String pageId)
Returns the access token for a given page.
|
Account |
getAccount(String pageId)
Returns an
Account object for the user's access to the given page. |
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(PagePostData post)
Posts to a page's feed as a page administrator.
|
String |
post(String pageId,
String message)
Deprecated.
Use
PostData instead. |
String |
post(String pageId,
String message,
FacebookLink link)
Deprecated.
Use
PostData instead. |
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)
Searches for pages that match a given query.
|
PagedList<Page> |
searchPlaces(String query,
double latitude,
double longitude,
long distance)
Searches for places near a given coordinate.
|
void |
updatePage(PageUpdate pageUpdate)
Updates page information.
|
Page getPage(String pageId)
pageId - the page ID.Pagevoid updatePage(PageUpdate pageUpdate)
pageUpdate - a PageUpdate object that carries the fields to update on the page.boolean 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()
@Deprecated String post(String pageId, String message)
PostData instead.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.@Deprecated String post(String pageId, String message, FacebookLink link)
PostData instead.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 post(PagePostData post)
FeedOperations.post(String, String) instead.post - A PagePostData with the post's payload.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)
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)
query - the search queryPages 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.PagedList<Page> searchPlaces(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.String getAccessToken(String pageId)
pageId - the page to fetch the access token forAccount getAccount(String pageId)
Account object for the user's access to the given page.pageId - the page to fetch the Account details forAccount object for the given page ID