|
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. |
java.util.List<Album> |
getAlbums()
Retrieves a list of albums belonging to the authenticated user. |
java.util.List<Album> |
getAlbums(int offset,
int limit)
Retrieves a list of albums belonging to the authenticated user. |
java.util.List<Album> |
getAlbums(java.lang.String ownerId)
Retrieves a list of albums belonging to a specific owner (user, page, etc). |
java.util.List<Album> |
getAlbums(java.lang.String ownerId,
int offset,
int limit)
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. |
java.util.List<Photo> |
getPhotos(java.lang.String objectId)
Retrieves data for up to 25 photos from a specific album or that a user is tagged in. |
java.util.List<Photo> |
getPhotos(java.lang.String objectId,
int offset,
int limit)
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. |
java.util.List<Video> |
getVideos()
Retrieves a list of up to 25 videos that the authenticated user is tagged in. |
java.util.List<Video> |
getVideos(int offset,
int limit)
Retrieves a list of videos that the authenticated user is tagged in. |
java.util.List<Video> |
getVideos(java.lang.String userId)
Retrieves a list of up to 25 videos that a specified user is tagged in. |
java.util.List<Video> |
getVideos(java.lang.String userId,
int offset,
int limit)
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 |
---|
java.util.List<Album> getAlbums()
Album
s 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.java.util.List<Album> getAlbums(int offset, int limit)
offset
- the offset into the list of albumslimit
- the maximum number of albums to return
Album
s 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.java.util.List<Album> getAlbums(java.lang.String ownerId)
ownerId
- the album owner's ID
Album
s 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.java.util.List<Album> getAlbums(java.lang.String ownerId, int offset, int limit)
ownerId
- the album owner's IDoffset
- the offset into the list of albumslimit
- the maximum number of albums to return
Album
s 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.java.util.List<Photo> getPhotos(java.lang.String objectId)
objectId
- either an album ID or a user ID
Photo
s 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.java.util.List<Photo> getPhotos(java.lang.String objectId, int offset, int limit)
objectId
- either an album ID or a user IDoffset
- the offset into the list of photoslimit
- the maximum number of photos to return
Photo
s 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.java.util.List<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.java.util.List<Video> getVideos(int offset, int limit)
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.java.util.List<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.java.util.List<Video> getVideos(java.lang.String userId, int offset, int limit)
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.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 |