public interface MediaOperations
| Modifier and Type | Method and Description |
|---|---|
String |
createAlbum(String name,
String description)
Creates a new photo album.
|
String |
createAlbum(String ownerId,
String name,
String description)
Creates a new photo album.
|
Album |
getAlbum(String albumId)
Retrieves data for a specific album.
|
byte[] |
getAlbumImage(String albumId)
Retrieves an album's image as an array of bytes.
|
byte[] |
getAlbumImage(String albumId,
ImageType imageType)
Retrieves an album's image as an array of bytes.
|
PagedList<Album> |
getAlbums()
Retrieves a list of albums belonging to the authenticated user.
|
PagedList<Album> |
getAlbums(PagingParameters pagedListParameters)
Retrieves a list of albums belonging to the authenticated user.
|
PagedList<Album> |
getAlbums(String ownerId)
Retrieves a list of albums belonging to a specific owner (user, page, etc).
|
PagedList<Album> |
getAlbums(String ownerId,
PagingParameters pagedListParameters)
Retrieves a list of albums belonging to a specific owner (user, page, etc).
|
Photo |
getPhoto(String photoId)
Retrieve data for a specified photo.
|
byte[] |
getPhotoImage(String photoId)
Retrieves a photo's image as an array of bytes.
|
byte[] |
getPhotoImage(String photoId,
ImageType imageType)
Retrieves a photo's image as an array of bytes.
|
PagedList<Photo> |
getPhotos(String objectId)
Retrieves data for up to 25 photos from a specific album or that a user is tagged in.
|
PagedList<Photo> |
getPhotos(String objectId,
PagingParameters pagedListParameters)
Retrieves photo data from a specific album or that a user is tagged in.
|
Video |
getVideo(String videoId)
Retrieves data for a specific video.
|
byte[] |
getVideoImage(String videoId)
Retrieves a video's image as an array of bytes.
|
PagedList<Video> |
getVideos()
Retrieves a list of up to 25 videos that the authenticated user is tagged in.
|
PagedList<Video> |
getVideos(PagingParameters pagedListParameters)
Retrieves a list of videos that the authenticated user is tagged in.
|
PagedList<Video> |
getVideos(String userId)
Retrieves a list of up to 25 videos that a specified user is tagged in.
|
PagedList<Video> |
getVideos(String userId,
PagingParameters pagedListParameters)
Retrieves a list of videos that a specified user is tagged in.
|
String |
postPhoto(Resource photo)
Uploads a photo to an album created specifically for the application.
|
String |
postPhoto(Resource photo,
String caption)
Uploads a photo to an album created specifically for the application.
|
String |
postPhoto(String albumId,
Resource photo)
Uploads a photo to a specific album.
|
String |
postPhoto(String albumId,
Resource photo,
String caption)
Uploads a photo to a specific album.
|
String |
postVideo(Resource video)
Uploads a video for the authenticated user.
|
String |
postVideo(Resource video,
String title,
String description)
Uploads a video for the authenticated user.
|
void |
tagVideo(String videoId,
String userId)
Tags a video with the given user ID.
|
PagedList<Album> getAlbums()
Albums for the user, or an empty list if not available.org.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the user has not granted "user_photos" permission.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.PagedList<Album> getAlbums(PagingParameters pagedListParameters)
pagedListParameters - the parameters defining the bounds of the list to return.Albums for the user, or an empty list if not available.org.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the user has not granted "user_photos" permission.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.PagedList<Album> getAlbums(String ownerId)
ownerId - the album owner's IDAlbums for the user, or an empty list if not available.org.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the user has not granted "user_photos" permission.PagedList<Album> getAlbums(String ownerId, PagingParameters pagedListParameters)
ownerId - the album owner's IDpagedListParameters - the parameters defining the bounds of the list to return.Albums for the user, or an empty list if not available.org.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the user has not granted "user_photos" permission.Album getAlbum(String albumId)
albumId - the album IDAlbum object.org.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the album is not public and if the user has not granted "user_photos" permission.String createAlbum(String name, String description)
name - the name of the album.description - the album's description.org.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the user has not granted "user_photos" permission.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.String createAlbum(String ownerId, String name, String description)
ownerId - the owner of the album, possibly a page ID.name - the name of the album.description - the album's description.org.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the user has not granted "user_photos" permission.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.byte[] getAlbumImage(String albumId)
albumId - the album IDorg.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the album is not public and if the user has not granted "user_photos" permission.byte[] getAlbumImage(String albumId, ImageType imageType)
albumId - the album IDimageType - the image type (eg., small, normal, large. square)org.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the album is not public and if the user has not granted "user_photos" permission.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.PagedList<Photo> getPhotos(String objectId)
objectId - either an album ID or a user IDPhotos in the specified album.org.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the album is not public and if the user has not granted "user_photos" permission.PagedList<Photo> getPhotos(String objectId, PagingParameters pagedListParameters)
objectId - either an album ID or a user IDpagedListParameters - the parameters defining the bounds of the list to return.Photos in the specified album.org.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the album is not public and if the user has not granted "user_photos" permission.Photo getPhoto(String photoId)
photoId - the photo's IDPhotoorg.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the photo is not public and if the user has not granted "user_photos" permission.byte[] getPhotoImage(String photoId)
photoId - the photo IDorg.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the photo is not public and if the user has not granted "user_photos" permission.byte[] getPhotoImage(String photoId, ImageType imageType)
photoId - the photo IDimageType - the image type (eg., small, normal, large. square)org.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the photo is not public and if the user has not granted "user_photos" permission.String postPhoto(Resource photo)
photo - 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 "publish_actions" permission.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.String postPhoto(Resource photo, String caption)
photo - 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 "publish_actions" permission.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.String postPhoto(String albumId, Resource photo)
albumId - the ID of the album to upload the photo to.photo - 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 "publish_actions" permission.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.String postPhoto(String albumId, Resource photo, String caption)
albumId - the ID of the album to upload the photo to.photo - 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 "publish_actions" permission.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.PagedList<Video> getVideos()
Video belonging to the authenticated user.org.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the user has not granted "user_videos" permission.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.PagedList<Video> getVideos(PagingParameters pagedListParameters)
pagedListParameters - the parameters defining the bounds of the list to return.Video belonging to the authenticated user.org.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the user has not granted "user_videos" permission.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.PagedList<Video> getVideos(String userId)
userId - the ID of the user who is tagged in the videosVideo which the specified user is tagged in.org.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the user has not granted "user_videos" permission.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.PagedList<Video> getVideos(String userId, PagingParameters pagedListParameters)
userId - the ID of the user who is tagged in the videospagedListParameters - the parameters defining the bounds of the list to return.Video which the specified user is tagged in.org.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the user has not granted "user_videos" permission.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.Video getVideo(String videoId)
videoId - the ID of the video.Video data.org.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the user has not granted "user_videos" permission.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.byte[] getVideoImage(String videoId)
videoId - the video IDorg.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the user has not granted "user_videos" permission.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.String postVideo(Resource video)
video - A Resource for the video 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 "publish_actions" permission.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.String postVideo(Resource video, String title, String description)
video - A Resource for the video data. The given Resource must implement the getFilename() method (such as FileSystemResource or ClassPathResource).title - the video titledescription - the video descriptionorg.springframework.social.ApiException - if there is an error while communicating with Facebook.org.springframework.social.InsufficientPermissionException - if the user has not granted "publish_actions" permission.org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.