|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PageOperations
Interface defining operations that can be performed on a Facebook pages.
Method Summary | |
---|---|
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. |
Method Detail |
---|
Page getPage(String pageId)
pageId
- the page ID.
Page
boolean isPageAdmin(String pageId)
pageId
- the page ID
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.
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 post
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 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 details
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |