org.springframework.social.facebook.api
Interface LikeOperations


public interface LikeOperations

Defines operations for working with a user's likes and interests.


Method Summary
 java.util.List<UserLike> getActivities()
          Retrieves a list of activities that the authenticated user likes.
 java.util.List<UserLike> getActivities(java.lang.String userId)
          Retrieves a list of activities that the given user likes.
 java.util.List<UserLike> getBooks()
          Retrieves a list of books that the authenticated user likes.
 java.util.List<UserLike> getBooks(java.lang.String userId)
          Retrieves a list of books that the given user has liked.
 java.util.List<UserLike> getInterests()
          Retrieves a list of interests that the authenticated user likes.
 java.util.List<UserLike> getInterests(java.lang.String userId)
          Retrieves a list of interests that the given user likes.
 java.util.List<UserLike> getLikes()
          Retrieves a list of things that the authenticated user has liked.
 java.util.List<UserLike> getLikes(java.lang.String userId)
          Retrieves a list of things that the given user has liked.
 java.util.List<UserLike> getMovies()
          Retrieves a list of movies that the authenticated user likes.
 java.util.List<UserLike> getMovies(java.lang.String userId)
          Retrieves a list of movies that the given user has liked.
 java.util.List<UserLike> getMusic()
          Retrieves a list of music that the authenticated user likes.
 java.util.List<UserLike> getMusic(java.lang.String userId)
          Retrieves a list of music that the given user has liked.
 java.util.List<UserLike> getTelevision()
          Retrieves a list of television shows that the authenticated user likes.
 java.util.List<UserLike> getTelevision(java.lang.String userId)
          Retrieves a list of television shows that the given user has liked.
 void like(java.lang.String objectId)
          Like an object on behalf of the authenticated user.
 void unlike(java.lang.String objectId)
          Unlike an object on behalf of the authenticated user.
 

Method Detail

getLikes

java.util.List<UserLike> getLikes()
Retrieves a list of things that the authenticated user has liked. Requires "user_likes" permission. Returns an empty list if permission isn't granted.

Returns:
a list of UserLike objects

getLikes

java.util.List<UserLike> getLikes(java.lang.String userId)
Retrieves a list of things that the given user has liked. Requires "user_likes" permission for the authenticated user and "friends_likes" for the authenticated user's friends. Returns an empty list if permission isn't granted.

Parameters:
userId - the ID of the user
Returns:
a list of UserLike objects

like

void like(java.lang.String objectId)
Like an object on behalf of the authenticated user.

Parameters:
objectId - the object ID

unlike

void unlike(java.lang.String objectId)
Unlike an object on behalf of the authenticated user.

Parameters:
objectId - the object ID

getBooks

java.util.List<UserLike> getBooks()
Retrieves a list of books that the authenticated user likes. Requires "user_likes" permission. Returns an empty list if permission isn't granted.

Returns:
a list of UserLike objects

getBooks

java.util.List<UserLike> getBooks(java.lang.String userId)
Retrieves a list of books that the given user has liked. Requires "user_likes" permission for the authenticated user and "friends_likes" for the authenticated user's friends. Returns an empty list if permission isn't granted.

Parameters:
userId - the ID of the user
Returns:
a list of UserLike objects

getMovies

java.util.List<UserLike> getMovies()
Retrieves a list of movies that the authenticated user likes. Requires "user_likes" permission. Returns an empty list if permission isn't granted.

Returns:
a list of UserLike objects

getMovies

java.util.List<UserLike> getMovies(java.lang.String userId)
Retrieves a list of movies that the given user has liked. Requires "user_likes" permission for the authenticated user and "friends_likes" for the authenticated user's friends. Returns an empty list if permission isn't granted.

Parameters:
userId - the ID of the user
Returns:
a list of UserLike objects

getMusic

java.util.List<UserLike> getMusic()
Retrieves a list of music that the authenticated user likes. Requires "user_likes" permission. Returns an empty list if permission isn't granted.

Returns:
a list of UserLike objects

getMusic

java.util.List<UserLike> getMusic(java.lang.String userId)
Retrieves a list of music that the given user has liked. Requires "user_likes" permission for the authenticated user and "friends_likes" for the authenticated user's friends. Returns an empty list if permission isn't granted.

Parameters:
userId - the ID of the user
Returns:
a list of UserLike objects

getTelevision

java.util.List<UserLike> getTelevision()
Retrieves a list of television shows that the authenticated user likes. Requires "user_likes" permission. Returns an empty list if permission isn't granted.

Returns:
a list of UserLike objects

getTelevision

java.util.List<UserLike> getTelevision(java.lang.String userId)
Retrieves a list of television shows that the given user has liked. Requires "user_likes" permission for the authenticated user and "friends_likes" for the authenticated user's friends. Returns an empty list if permission isn't granted.

Parameters:
userId - the ID of the user
Returns:
a list of UserLike objects

getActivities

java.util.List<UserLike> getActivities()
Retrieves a list of activities that the authenticated user likes. Requires "user_activities" permission. Returns an empty list if permission isn't granted.

Returns:
a list of UserLike objects

getActivities

java.util.List<UserLike> getActivities(java.lang.String userId)
Retrieves a list of activities that the given user likes. Requires "user_activities" permission for the authenticated user and "friends_activities" for the authenticated user's friends. Returns an empty list if permission isn't granted.

Parameters:
userId - the ID of the user
Returns:
a list of UserLike objects

getInterests

java.util.List<UserLike> getInterests()
Retrieves a list of interests that the authenticated user likes. Requires "user_interests" permission. Returns an empty list if permission isn't granted.

Returns:
a list of UserLike objects

getInterests

java.util.List<UserLike> getInterests(java.lang.String userId)
Retrieves a list of interests that the given user likes. Requires "user_interests" permission for the authenticated user and "friends_interests" for the authenticated user's friends. Returns an empty list if permission isn't granted.

Parameters:
userId - the ID of the user
Returns:
a list of UserLike objects