facebook4j.api
Interface PhotoMethods

All Known Subinterfaces:
Facebook
All Known Implementing Classes:
FacebookImpl

public interface PhotoMethods

Author:
Ryuji Yamashita - roundrop at gmail.com

Method Summary
 boolean addTagToPhoto(java.lang.String photoId, java.util.List<java.lang.String> toUserIds)
          Adds the tag to a photo.
 boolean addTagToPhoto(java.lang.String photoId, java.lang.String toUserId)
          Adds the tag to a photo.
 boolean addTagToPhoto(java.lang.String photoId, TagUpdate tagUpdate)
          Adds the tag to a photo.
 java.lang.String commentPhoto(java.lang.String photoId, java.lang.String message)
          Comments on the photo.
 boolean deletePhoto(java.lang.String photoId)
          Deletes the photo.
 boolean deleteTagOnPhoto(java.lang.String photoId, java.lang.String toUserId)
          Deletes a tag for a particular user in the photo.
 Photo getPhoto(java.lang.String photoId)
          Returns a single photo.
 Photo getPhoto(java.lang.String photoId, Reading reading)
          Returns a single photo.
 ResponseList<Comment> getPhotoComments(java.lang.String photoId)
          Returns the comments made on a photo.
 ResponseList<Comment> getPhotoComments(java.lang.String photoId, Reading reading)
          Returns the comments made on a photo.
 ResponseList<Like> getPhotoLikes(java.lang.String photoId)
          Returns the likes made on a photo.
 ResponseList<Like> getPhotoLikes(java.lang.String photoId, Reading reading)
          Returns the likes made on a photo.
 ResponseList<Photo> getPhotos()
          Returns the photos the current user/page is tagged in.
 ResponseList<Photo> getPhotos(Reading reading)
          Returns the photos the current user/page is tagged in.
 ResponseList<Photo> getPhotos(java.lang.String id)
          Returns the photos a user is tagged in / uploaded to a page / published to an event.
 ResponseList<Photo> getPhotos(java.lang.String id, Reading reading)
          Returns the photos a user is tagged in / uploaded to a page / published to an event.
 java.net.URL getPhotoURL(java.lang.String photoId)
          Returns url of a photo.
 ResponseList<Tag> getTagsOnPhoto(java.lang.String photoId)
          Returns the Users tagged in a photo.
 ResponseList<Tag> getTagsOnPhoto(java.lang.String photoId, Reading reading)
          Returns the Users tagged in a photo.
 boolean likePhoto(java.lang.String photoId)
          Likes the photo.
 java.lang.String postPhoto(Media source)
          Posts a photo to the current user's wall.
 java.lang.String postPhoto(PhotoUpdate photoUpdate)
          Posts a photo to the current user's wall.
 java.lang.String postPhoto(java.lang.String userId, Media source)
          Posts the photo to a user's wall.
 java.lang.String postPhoto(java.lang.String userId, PhotoUpdate photoUpdate)
          Posts the photo to a user's wall.
 boolean unlikePhoto(java.lang.String photoId)
          Unlikes the photo.
 boolean updateTagOnPhoto(java.lang.String photoId, TagUpdate tagUpdate)
          Updates the position of the tag on a photo.
 

Method Detail

getPhotos

ResponseList<Photo> getPhotos()
                              throws FacebookException
Returns the photos the current user/page is tagged in.

Returns:
photos
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#photos - Facebook Developers, Page#photos - Facebook Developers

getPhotos

ResponseList<Photo> getPhotos(Reading reading)
                              throws FacebookException
Returns the photos the current user/page is tagged in.

Parameters:
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
photos
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#photos - Facebook Developers, Page#photos - Facebook Developers

getPhotos

ResponseList<Photo> getPhotos(java.lang.String id)
                              throws FacebookException
Returns the photos a user is tagged in / uploaded to a page / published to an event.

Parameters:
id - the ID of a user/page/event
Returns:
photos
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#photos - Facebook Developers, Page#photos - Facebook Developers, Event#photos - Facebook Developers

getPhotos

ResponseList<Photo> getPhotos(java.lang.String id,
                              Reading reading)
                              throws FacebookException
Returns the photos a user is tagged in / uploaded to a page / published to an event.

Parameters:
id - the ID of a user/page/event
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
photos
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#photos - Facebook Developers, Page#photos - Facebook Developers, Event#photos - Facebook Developers

postPhoto

java.lang.String postPhoto(Media source)
                           throws FacebookException
Posts a photo to the current user's wall.

Parameters:
source - photo content
Returns:
The new photo ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#photos - Facebook Developers

postPhoto

java.lang.String postPhoto(PhotoUpdate photoUpdate)
                           throws FacebookException
Posts a photo to the current user's wall.

Parameters:
photoUpdate - the photo to be created
Returns:
The new photo ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#photos - Facebook Developers

postPhoto

java.lang.String postPhoto(java.lang.String userId,
                           Media source)
                           throws FacebookException
Posts the photo to a user's wall.

Parameters:
userId - the ID of a user
source - photo content
Returns:
The new photo ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#photos - Facebook Developers

postPhoto

java.lang.String postPhoto(java.lang.String userId,
                           PhotoUpdate photoUpdate)
                           throws FacebookException
Posts the photo to a user's wall.

Parameters:
userId - the ID of a user
photoUpdate - the photo to be created
Returns:
The new photo ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#photos - Facebook Developers

deletePhoto

boolean deletePhoto(java.lang.String photoId)
                    throws FacebookException
Deletes the photo.

Parameters:
photoId - the ID of the photo
Returns:
true if delete is successful
Throws:
FacebookException - when Facebook service or network is unavailable

getPhoto

Photo getPhoto(java.lang.String photoId)
               throws FacebookException
Returns a single photo.

Parameters:
photoId - the ID of the photo
Returns:
photo
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Photo - Facebook Developers

getPhoto

Photo getPhoto(java.lang.String photoId,
               Reading reading)
               throws FacebookException
Returns a single photo.

Parameters:
photoId - the ID of the photo
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
photo
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Photo - Facebook Developers

getPhotoComments

ResponseList<Comment> getPhotoComments(java.lang.String photoId)
                                       throws FacebookException
Returns the comments made on a photo.

Parameters:
photoId - the ID of a photo
Returns:
comments
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Photo#comments - Facebook Developers

getPhotoComments

ResponseList<Comment> getPhotoComments(java.lang.String photoId,
                                       Reading reading)
                                       throws FacebookException
Returns the comments made on a photo.

Parameters:
photoId - the ID of a photo
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
comments
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Photo#comments - Facebook Developers

commentPhoto

java.lang.String commentPhoto(java.lang.String photoId,
                              java.lang.String message)
                              throws FacebookException
Comments on the photo.

Parameters:
photoId - the ID of the photo
message - comment text
Returns:
The new comment ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Photo#comments - Facebook Developers

getPhotoLikes

ResponseList<Like> getPhotoLikes(java.lang.String photoId)
                                 throws FacebookException
Returns the likes made on a photo.

Parameters:
photoId - the ID of a photo
Returns:
likes
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Photo#likes - Facebook Developers

getPhotoLikes

ResponseList<Like> getPhotoLikes(java.lang.String photoId,
                                 Reading reading)
                                 throws FacebookException
Returns the likes made on a photo.

Parameters:
photoId - the ID of a photo
reading - optional reading parameters. see Graph API#reading - Facebook Developers see Graph API#reading - Facebook Developers
Returns:
likes
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Photo#likes - Facebook Developers

likePhoto

boolean likePhoto(java.lang.String photoId)
                  throws FacebookException
Likes the photo.

Parameters:
photoId - the ID of the photo
Returns:
true if like is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Photo#likes - Facebook Developers

unlikePhoto

boolean unlikePhoto(java.lang.String photoId)
                    throws FacebookException
Unlikes the photo.

Parameters:
photoId - the ID of the photo
Returns:
true if unlike is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Photo#likes - Facebook Developers

getPhotoURL

java.net.URL getPhotoURL(java.lang.String photoId)
                         throws FacebookException
Returns url of a photo.

Parameters:
photoId - the ID of a photo
Returns:
url
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Photo - Facebook Developers - Connections - picture

getTagsOnPhoto

ResponseList<Tag> getTagsOnPhoto(java.lang.String photoId)
                                 throws FacebookException
Returns the Users tagged in a photo.

Parameters:
photoId - the ID of a photo
Returns:
tags
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Photo - Facebook Developers - Connections - tags

getTagsOnPhoto

ResponseList<Tag> getTagsOnPhoto(java.lang.String photoId,
                                 Reading reading)
                                 throws FacebookException
Returns the Users tagged in a photo.

Parameters:
photoId - the ID of a photo
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
tags
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Photo - Facebook Developers - Connections - tags

addTagToPhoto

boolean addTagToPhoto(java.lang.String photoId,
                      java.lang.String toUserId)
                      throws FacebookException
Adds the tag to a photo.

Parameters:
photoId - the ID of a photo
toUserId - the ID of the user to tag
Returns:
true if add is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Photo#tags - Facebook Developers - Connections - tags

addTagToPhoto

boolean addTagToPhoto(java.lang.String photoId,
                      java.util.List<java.lang.String> toUserIds)
                      throws FacebookException
Adds the tag to a photo.

Parameters:
photoId - the ID of a photo
toUserIds - the IDs of the users to tag
Returns:
true if add is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Photo#tags - Facebook Developers - Connections - tags

addTagToPhoto

boolean addTagToPhoto(java.lang.String photoId,
                      TagUpdate tagUpdate)
                      throws FacebookException
Adds the tag to a photo.

Parameters:
photoId - the ID of a photo
tagUpdate - tag information
Returns:
true if add is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Photo#tags - Facebook Developers - Connections - tags

updateTagOnPhoto

boolean updateTagOnPhoto(java.lang.String photoId,
                         TagUpdate tagUpdate)
                         throws FacebookException
Updates the position of the tag on a photo.

Parameters:
photoId - the ID of a photo
tagUpdate - tag information, supports 'to', 'x', 'y'
Returns:
true if update is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Photo#tags - Facebook Developers - Connections - tags

deleteTagOnPhoto

boolean deleteTagOnPhoto(java.lang.String photoId,
                         java.lang.String toUserId)
                         throws FacebookException
Deletes a tag for a particular user in the photo.

Parameters:
photoId - the ID of a photo
toUserId - the ID of the user to tag
Returns:
true if delete is successful
Throws:
FacebookException - when Facebook service or network is unavailable
Since:
Facebook4J 2.0.0
See Also:
Photo#tags - Facebook Developers - Connections - tags