facebook4j.api
Interface PhotoMethods

All Known Subinterfaces:
Facebook

public interface PhotoMethods

Author:
Ryuji Yamashita - roundrop at gmail.com

Method Summary
 boolean addTagToPhoto(String photoId, List<String> toUserIds)
          Adds the tag to a photo.
 boolean addTagToPhoto(String photoId, String toUserId)
          Adds the tag to a photo.
 boolean addTagToPhoto(String photoId, TagUpdate tagUpdate)
          Adds the tag to a photo.
 String commentPhoto(String photoId, CommentUpdate commentUpdate)
          Comments on the photo.
 String commentPhoto(String photoId, String message)
          Comments on the photo.
 boolean deletePhoto(String photoId)
          Deletes the photo.
 boolean deleteTagOnPhoto(String photoId, String toUserId)
          Deletes a tag for a particular user in the photo.
 Photo getPhoto(String photoId)
          Returns a single photo.
 Photo getPhoto(String photoId, Reading reading)
          Returns a single photo.
 ResponseList<Comment> getPhotoComments(String photoId)
          Returns the comments made on a photo.
 ResponseList<Comment> getPhotoComments(String photoId, Reading reading)
          Returns the comments made on a photo.
 ResponseList<Like> getPhotoLikes(String photoId)
          Returns the likes made on a photo.
 ResponseList<Like> getPhotoLikes(String photoId, Reading reading)
          Returns the likes made on a photo.
 ResponseList<Reaction> getPhotoReactions(String photoId)
          Returns the reactions on a photo.
 ResponseList<Reaction> getPhotoReactions(String photoId, Reading reading)
          Returns the reactions 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(String id)
          Returns the photos a user is tagged in / uploaded to a page / published to an event.
 ResponseList<Photo> getPhotos(String id, Reading reading)
          Returns the photos a user is tagged in / uploaded to a page / published to an event.
 ResponseList<Post> getPhotoSharedposts(String photoId)
          Returns the posts in which this photo is shared.
 ResponseList<Post> getPhotoSharedposts(String photoId, Reading reading)
          Returns the posts in which this photo is shared.
 URL getPhotoURL(String photoId)
          Returns url of a photo.
 ResponseList<Tag> getTagsOnPhoto(String photoId)
          Returns the Users tagged in a photo.
 ResponseList<Tag> getTagsOnPhoto(String photoId, Reading reading)
          Returns the Users tagged in a photo.
 ResponseList<Photo> getUploadedPhotos()
          Returns All of the updates photos of the current user/page.
 ResponseList<Photo> getUploadedPhotos(Reading reading)
          Returns All of the updates photos of the current user/page.
 ResponseList<Photo> getUploadedPhotos(String id)
          Returns All of the updates photos of the current user/page.
 ResponseList<Photo> getUploadedPhotos(String id, Reading reading)
          Returns All of the updates photos of the current user/page.
 boolean likePhoto(String photoId)
          Likes the photo.
 String postPhoto(Media source)
          Posts a photo to the current user's wall.
 String postPhoto(PhotoUpdate photoUpdate)
          Posts a photo to the current user's wall.
 String postPhoto(String userId, Media source)
          Posts the photo to a user's wall.
 String postPhoto(String userId, PhotoUpdate photoUpdate)
          Posts the photo to a user's wall.
 boolean unlikePhoto(String photoId)
          Unlikes the photo.
 boolean updateTagOnPhoto(String photoId, TagUpdate tagUpdate)
          Updates the position of the tag on a photo.
 

Method Detail

getUploadedPhotos

ResponseList<Photo> getUploadedPhotos()
                                      throws FacebookException
Returns All of the updates photos of the current user/page.

Returns:
photos
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User - Facebook Developers (Connections - /photos/uploaded)

getUploadedPhotos

ResponseList<Photo> getUploadedPhotos(Reading reading)
                                      throws FacebookException
Returns All of the updates photos of the current user/page.

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 - Facebook Developers (Connections - /photos/uploaded)

getUploadedPhotos

ResponseList<Photo> getUploadedPhotos(String id)
                                      throws FacebookException
Returns All of the updates photos of the current user/page.

Parameters:
id - the ID of a user/page
Returns:
photos
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User - Facebook Developers (Connections - /photos/uploaded)

getUploadedPhotos

ResponseList<Photo> getUploadedPhotos(String id,
                                      Reading reading)
                                      throws FacebookException
Returns All of the updates photos of the current user/page.

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

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(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(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

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

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

String postPhoto(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

String postPhoto(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(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(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(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(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(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

getPhotoSharedposts

ResponseList<Post> getPhotoSharedposts(String photoId)
                                       throws FacebookException
Returns the posts in which this photo is shared.

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

getPhotoSharedposts

ResponseList<Post> getPhotoSharedposts(String photoId,
                                       Reading reading)
                                       throws FacebookException
Returns the posts in which this photo is shared.

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

commentPhoto

String commentPhoto(String photoId,
                    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

commentPhoto

String commentPhoto(String photoId,
                    CommentUpdate commentUpdate)
                    throws FacebookException
Comments on the photo.

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

getPhotoLikes

ResponseList<Like> getPhotoLikes(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(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(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(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

URL getPhotoURL(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(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(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(String photoId,
                      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(String photoId,
                      List<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(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(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(String photoId,
                         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

getPhotoReactions

ResponseList<Reaction> getPhotoReactions(String photoId)
                                         throws FacebookException
Returns the reactions on a photo.

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

getPhotoReactions

ResponseList<Reaction> getPhotoReactions(String photoId,
                                         Reading reading)
                                         throws FacebookException
Returns the reactions 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:
reactions
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
Reactions - Facebook Developers


Copyright © 2019. All rights reserved.