|
Spring Social Facebook | ||||||||
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 | |
---|---|
java.util.List<Account> |
getAccounts()
Retrieves a list of Account objects for the pages that the authenticated user is an administrator. |
Page |
getPage(java.lang.String pageId)
Retrieves data for a page. |
boolean |
isPageAdmin(java.lang.String pageId)
Checks whether the logged-in user for this session is an admin of the page with the given page ID. |
java.lang.String |
post(java.lang.String pageId,
java.lang.String message)
Posts a message to a page's feed as a page administrator. |
java.lang.String |
post(java.lang.String pageId,
java.lang.String message,
FacebookLink link)
Posts a link to the page's feed as a page administrator. |
java.lang.String |
postPhoto(java.lang.String pageId,
java.lang.String albumId,
org.springframework.core.io.Resource photo)
Posts a photo to a page's album as the page administrator. |
java.lang.String |
postPhoto(java.lang.String pageId,
java.lang.String albumId,
org.springframework.core.io.Resource photo,
java.lang.String caption)
Posts a photo to a page's album as the page administrator. |
Method Detail |
---|
Page getPage(java.lang.String pageId)
pageId
- the page ID.
Page
boolean isPageAdmin(java.lang.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.java.util.List<Account> getAccounts()
java.lang.String post(java.lang.String pageId, java.lang.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.java.lang.String post(java.lang.String pageId, java.lang.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.java.lang.String postPhoto(java.lang.String pageId, java.lang.String albumId, org.springframework.core.io.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.java.lang.String postPhoto(java.lang.String pageId, java.lang.String albumId, org.springframework.core.io.Resource photo, java.lang.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.
|
Spring Social Facebook | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |