|
Spring Social Facebook | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface MediaOperations
Defines operations for working with albums, photos, and videos.
| Method Summary | |
|---|---|
java.lang.String |
createAlbum(java.lang.String name,
java.lang.String description)
Creates a new photo album. |
Album |
getAlbum(java.lang.String albumId)
Retrieves data for a specific album. |
byte[] |
getAlbumImage(java.lang.String albumId)
Retrieves an album's image as an array of bytes. |
byte[] |
getAlbumImage(java.lang.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(int offset,
int limit)
Deprecated. Use getAlbums(PagingParameters) instead. |
PagedList<Album> |
getAlbums(PagingParameters pagedListParameters)
Retrieves a list of albums belonging to the authenticated user. |
PagedList<Album> |
getAlbums(java.lang.String ownerId)
Retrieves a list of albums belonging to a specific owner (user, page, etc). |
PagedList<Album> |
getAlbums(java.lang.String ownerId,
int offset,
int limit)
Deprecated. Use getAlbums(String, PagingParameters) instead |
PagedList<Album> |
getAlbums(java.lang.String ownerId,
PagingParameters pagedListParameters)
Retrieves a list of albums belonging to a specific owner (user, page, etc). |
Photo |
getPhoto(java.lang.String photoId)
Retrieve data for a specified photo. |
byte[] |
getPhotoImage(java.lang.String photoId)
Retrieves a photo's image as an array of bytes. |
byte[] |
getPhotoImage(java.lang.String photoId,
ImageType imageType)
Retrieves a photo's image as an array of bytes. |
PagedList<Photo> |
getPhotos(java.lang.String objectId)
Retrieves data for up to 25 photos from a specific album or that a user is tagged in. |
PagedList<Photo> |
getPhotos(java.lang.String objectId,
int offset,
int limit)
Deprecated. Use getPhotos(String, PagingParameters) instead. |
PagedList<Photo> |
getPhotos(java.lang.String objectId,
PagingParameters pagedListParameters)
Retrieves photo data from a specific album or that a user is tagged in. |
Video |
getVideo(java.lang.String videoId)
Retrieves data for a specific video. |
byte[] |
getVideoImage(java.lang.String videoId)
Retrieves a video's image as an array of bytes. |
byte[] |
getVideoImage(java.lang.String videoId,
ImageType imageType)
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(int offset,
int limit)
Deprecated. Use getVideos(PagingParameters) instead. |
PagedList<Video> |
getVideos(PagingParameters pagedListParameters)
Retrieves a list of videos that the authenticated user is tagged in. |
PagedList<Video> |
getVideos(java.lang.String userId)
Retrieves a list of up to 25 videos that a specified user is tagged in. |
PagedList<Video> |
getVideos(java.lang.String userId,
int offset,
int limit)
Deprecated. Use getVideos(String, PagingParameters) instead. |
PagedList<Video> |
getVideos(java.lang.String userId,
PagingParameters pagedListParameters)
Retrieves a list of videos that a specified user is tagged in. |
java.lang.String |
postPhoto(org.springframework.core.io.Resource photo)
Uploads a photo to an album created specifically for the application. |
java.lang.String |
postPhoto(org.springframework.core.io.Resource photo,
java.lang.String caption)
Uploads a photo to an album created specifically for the application. |
java.lang.String |
postPhoto(java.lang.String albumId,
org.springframework.core.io.Resource photo)
Uploads a photo to a specific album. |
java.lang.String |
postPhoto(java.lang.String albumId,
org.springframework.core.io.Resource photo,
java.lang.String caption)
Uploads a photo to a specific album. |
java.lang.String |
postVideo(org.springframework.core.io.Resource video)
Uploads a video for the authenticated user. |
java.lang.String |
postVideo(org.springframework.core.io.Resource video,
java.lang.String title,
java.lang.String description)
Uploads a video for the authenticated user. |
| Method Detail |
|---|
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" or "friends_photos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.
@Deprecated
PagedList<Album> getAlbums(int offset,
int limit)
getAlbums(PagingParameters) instead.
offset - the offset into the list of albumslimit - the maximum number of albums 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" or "friends_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" or "friends_photos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.PagedList<Album> getAlbums(java.lang.String ownerId)
ownerId - the album owner's ID
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" or "friends_photos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.
@Deprecated
PagedList<Album> getAlbums(java.lang.String ownerId,
int offset,
int limit)
getAlbums(String, PagingParameters) instead
ownerId - the album owner's IDoffset - the offset into the list of albumslimit - the maximum number of albums 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" or "friends_photos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.
PagedList<Album> getAlbums(java.lang.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" or "friends_photos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.Album getAlbum(java.lang.String albumId)
albumId - the album ID
Album 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" or "friends_photos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.
java.lang.String createAlbum(java.lang.String name,
java.lang.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 "publish_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.byte[] getAlbumImage(java.lang.String albumId)
albumId - the album ID
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" or "friends_photos" permission.
byte[] getAlbumImage(java.lang.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" or "friends_photos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.PagedList<Photo> getPhotos(java.lang.String objectId)
objectId - either an album ID or a user ID
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" or "friends_photos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.
@Deprecated
PagedList<Photo> getPhotos(java.lang.String objectId,
int offset,
int limit)
getPhotos(String, PagingParameters) instead.
objectId - either an album ID or a user IDoffset - the offset into the list of photoslimit - the maximum number of photos 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" or "friends_photos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.
PagedList<Photo> getPhotos(java.lang.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" or "friends_photos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.Photo getPhoto(java.lang.String photoId)
photoId - the photo's ID
Photo
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" or "friends_photos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.byte[] getPhotoImage(java.lang.String photoId)
photoId - the photo ID
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" or "friends_photos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.
byte[] getPhotoImage(java.lang.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" or "friends_photos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.java.lang.String postPhoto(org.springframework.core.io.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_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.
java.lang.String postPhoto(org.springframework.core.io.Resource photo,
java.lang.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_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.
java.lang.String postPhoto(java.lang.String albumId,
org.springframework.core.io.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_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.
java.lang.String postPhoto(java.lang.String albumId,
org.springframework.core.io.Resource photo,
java.lang.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_stream" 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.
@Deprecated
PagedList<Video> getVideos(int offset,
int limit)
getVideos(PagingParameters) instead.
offset - the offset into the list of videoslimit - the maximum number of videos 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(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(java.lang.String userId)
userId - the ID of the user who is tagged in the videos
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" or "friends_videos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.
@Deprecated
PagedList<Video> getVideos(java.lang.String userId,
int offset,
int limit)
getVideos(String, PagingParameters) instead.
userId - the ID of the user who is tagged in the videosoffset - the offset into the list of videoslimit - the maximum number of videos 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" or "friends_videos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.
PagedList<Video> getVideos(java.lang.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" or "friends_videos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.Video getVideo(java.lang.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" or "friends_videos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.byte[] getVideoImage(java.lang.String videoId)
videoId - the video ID
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" or "friends_videos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.
byte[] getVideoImage(java.lang.String videoId,
ImageType imageType)
videoId - the video 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 user has not granted "user_videos" or "friends_videos" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.java.lang.String postVideo(org.springframework.core.io.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_stream" permission.
org.springframework.social.MissingAuthorizationException - if FacebookTemplate was not created with an access token.
java.lang.String postVideo(org.springframework.core.io.Resource video,
java.lang.String title,
java.lang.String description)
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_stream" permission.
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 | ||||||||