facebook4j.api
Interface FriendMethods

All Known Subinterfaces:
Facebook

public interface FriendMethods

Author:
Ryuji Yamashita - roundrop at gmail.com

Method Summary
 boolean addFriendlistMember(String friendlistId, String userId)
          Adds a user to the friend list.
 String createFriendlist(String friendlistName)
          Creates the friend list for the current user.
 String createFriendlist(String userId, String friendlistName)
          Creates the friend list for a user.
 boolean deleteFriendlist(String friendlistId)
          Deletes the friend list.
 boolean deleteFriendlistMember(String friendlistId, String userId)
          This method is an alias of: removeFriendlistMember(String, String) .
 ResponseList<Friend> getBelongsFriend(String friendId)
          Returns the friend if the current user friends with.
 ResponseList<Friend> getBelongsFriend(String friendId, Reading reading)
          Returns the friend if the current user friends with.
 ResponseList<Friend> getBelongsFriend(String userId, String friendId)
          Returns the friend if a user friends with.
 ResponseList<Friend> getBelongsFriend(String userId, String friendId, Reading reading)
          Returns the friend if a user friends with.
 Friendlist getFriendlist(String friendlistId)
          Returns a single friend list.
 Friendlist getFriendlist(String friendlistId, Reading reading)
          Returns a single friend list.
 ResponseList<Friend> getFriendlistMembers(String friendlistId)
          Returns all of the users who are members of this list.
 ResponseList<Friendlist> getFriendlists()
          Returns the current user's friend lists.
 ResponseList<Friendlist> getFriendlists(Reading reading)
          Returns the current user's friend lists.
 ResponseList<Friendlist> getFriendlists(String userId)
          Returns the user's friend lists.
 ResponseList<Friendlist> getFriendlists(String userId, Reading reading)
          Returns the user's friend lists.
 ResponseList<FriendRequest> getFriendRequests()
          Returns the current user's incoming friend requests.
 ResponseList<FriendRequest> getFriendRequests(Reading reading)
          Returns the current user's incoming friend requests.
 ResponseList<FriendRequest> getFriendRequests(String userId)
          Returns the user's incoming friend requests.
 ResponseList<FriendRequest> getFriendRequests(String userId, Reading reading)
          Returns the user's incoming friend requests.
 ResponseList<Friend> getFriends()
          Returns the current user's friends.
 ResponseList<Friend> getFriends(Reading reading)
          Returns the current user's friends.
 ResponseList<Friend> getFriends(String userId)
          Returns a user's friends.
 ResponseList<Friend> getFriends(String userId, Reading reading)
          Returns a user's friends.
 ResponseList<Friend> getMutualFriends(String friendUserId)
          Returns the mutual friends between the current user and friend.
 ResponseList<Friend> getMutualFriends(String friendUserId, Reading reading)
          Returns the mutual friends between the current user and friend.
 ResponseList<Friend> getMutualFriends(String userId1, String userId2)
          Returns the mutual friends between two users.
 ResponseList<Friend> getMutualFriends(String userId1, String userId2, Reading reading)
          Returns the mutual friends between two users.
 ResponseList<TaggableFriend> getTaggableFriends()
          Returns the list of friends of the current user.
 ResponseList<TaggableFriend> getTaggableFriends(Reading reading)
          Returns the list of friends of the current user.
 ResponseList<TaggableFriend> getTaggableFriends(String userId)
          Returns the list of friends of the current user.
 ResponseList<TaggableFriend> getTaggableFriends(String userId, Reading reading)
          Returns the list of friends of the current user.
 boolean removeFriendlistMember(String friendlistId, String userId)
          Removes the user from a friend list.
 

Method Detail

getFriends

ResponseList<Friend> getFriends()
                                throws FacebookException
Returns the current user's friends.

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

getFriends

ResponseList<Friend> getFriends(Reading reading)
                                throws FacebookException
Returns the current user's friends.

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

getFriends

ResponseList<Friend> getFriends(String userId)
                                throws FacebookException
Returns a user's friends.

Parameters:
userId - the ID of a user
Returns:
friends
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#friends - Facebook Developers

getFriends

ResponseList<Friend> getFriends(String userId,
                                Reading reading)
                                throws FacebookException
Returns a user's friends.

Parameters:
userId - the ID of a user
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
friends
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#friends - Facebook Developers

getBelongsFriend

ResponseList<Friend> getBelongsFriend(String friendId)
                                      throws FacebookException
Returns the friend if the current user friends with.

Parameters:
friendId - the ID of the friend
Returns:
friend. If the current user is not a friend with the User represented by friendId, returns empty list.
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#friends - Facebook Developers

getBelongsFriend

ResponseList<Friend> getBelongsFriend(String friendId,
                                      Reading reading)
                                      throws FacebookException
Returns the friend if the current user friends with.

Parameters:
friendId - the ID of the friend
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
friend. If the current user is not a friend with the User represented by friendId, returns empty list.
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#friends - Facebook Developers

getBelongsFriend

ResponseList<Friend> getBelongsFriend(String userId,
                                      String friendId)
                                      throws FacebookException
Returns the friend if a user friends with.

Parameters:
userId - the ID of a user
friendId - the ID of the friend
Returns:
friend. If the user is not a friend with the User represented by friendId, returns empty list.
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#friends - Facebook Developers

getBelongsFriend

ResponseList<Friend> getBelongsFriend(String userId,
                                      String friendId,
                                      Reading reading)
                                      throws FacebookException
Returns the friend if a user friends with.

Parameters:
userId - the ID of a user
friendId - the ID of the friend
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
friend. If the user is not a friend with the User represented by friendId, returns empty list.
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#friends - Facebook Developers

getFriendlists

ResponseList<Friendlist> getFriendlists()
                                        throws FacebookException
Returns the current user's friend lists.

Returns:
friend lists
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User - Facebook Developers - Connections - friendlists

getFriendlists

ResponseList<Friendlist> getFriendlists(Reading reading)
                                        throws FacebookException
Returns the current user's friend lists.

Parameters:
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
friend lists
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User - Facebook Developers - Connections - friendlists

getFriendlists

ResponseList<Friendlist> getFriendlists(String userId)
                                        throws FacebookException
Returns the user's friend lists.

Parameters:
userId - the ID of a user
Returns:
friend lists
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User - Facebook Developers - Connections - friendlists

getFriendlists

ResponseList<Friendlist> getFriendlists(String userId,
                                        Reading reading)
                                        throws FacebookException
Returns the user's friend lists.

Parameters:
userId - the ID of a user
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
friend lists
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User - Facebook Developers - Connections - friendlists

createFriendlist

String createFriendlist(String friendlistName)
                        throws FacebookException
Creates the friend list for the current user.

Parameters:
friendlistName - friend list name
Returns:
The new friend list ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#friendlists - Facebook Developers

createFriendlist

String createFriendlist(String userId,
                        String friendlistName)
                        throws FacebookException
Creates the friend list for a user.

Parameters:
userId - the ID of a user
friendlistName - friend list name. Maximum 25 characters
Returns:
The new friend list ID
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#friendlists - Facebook Developers

getFriendlist

Friendlist getFriendlist(String friendlistId)
                         throws FacebookException
Returns a single friend list.

Parameters:
friendlistId - the ID of the friend list
Returns:
friend list
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
FriendList - Facebook Developers

getFriendlist

Friendlist getFriendlist(String friendlistId,
                         Reading reading)
                         throws FacebookException
Returns a single friend list.

Parameters:
friendlistId - the ID of the friend list
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
friend list
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
FriendList - Facebook Developers

deleteFriendlist

boolean deleteFriendlist(String friendlistId)
                         throws FacebookException
Deletes the friend list.

Parameters:
friendlistId - the ID of the friend list
Returns:
true if delete is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
FriendList - Facebook Developers

getFriendlistMembers

ResponseList<Friend> getFriendlistMembers(String friendlistId)
                                          throws FacebookException
Returns all of the users who are members of this list.

Parameters:
friendlistId - the ID of the friend list
Returns:
members of this list
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
FriendList#members - Facebook Developers

addFriendlistMember

boolean addFriendlistMember(String friendlistId,
                            String userId)
                            throws FacebookException
Adds a user to the friend list.

Parameters:
friendlistId - the ID of the friend list
userId - the ID of target user
Returns:
true if add is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
FriendList#members - Facebook Developers

removeFriendlistMember

boolean removeFriendlistMember(String friendlistId,
                               String userId)
                               throws FacebookException
Removes the user from a friend list.

Parameters:
friendlistId - the ID of a friend list
userId - the ID of a target user
Returns:
true if remove is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
FriendList#members - Facebook Developers

deleteFriendlistMember

boolean deleteFriendlistMember(String friendlistId,
                               String userId)
                               throws FacebookException
This method is an alias of: removeFriendlistMember(String, String) .

Parameters:
friendlistId - the ID of a friend list
userId - the ID of a target user
Returns:
true if remove is successful
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
FriendList#members - Facebook Developers

getFriendRequests

ResponseList<FriendRequest> getFriendRequests()
                                              throws FacebookException
Returns the current user's incoming friend requests.

Returns:
friend requests
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#friendrequests - Facebook Developers

getFriendRequests

ResponseList<FriendRequest> getFriendRequests(Reading reading)
                                              throws FacebookException
Returns the current user's incoming friend requests.

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

getFriendRequests

ResponseList<FriendRequest> getFriendRequests(String userId)
                                              throws FacebookException
Returns the user's incoming friend requests.

Parameters:
userId - the ID of a user
Returns:
friend requests
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#friendrequests - Facebook Developers

getFriendRequests

ResponseList<FriendRequest> getFriendRequests(String userId,
                                              Reading reading)
                                              throws FacebookException
Returns the user's incoming friend requests.

Parameters:
userId - the ID of a user
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
friend requests
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#friendrequests - Facebook Developers

getMutualFriends

ResponseList<Friend> getMutualFriends(String friendUserId)
                                      throws FacebookException
Returns the mutual friends between the current user and friend.

Parameters:
friendUserId - the ID of a friend
Returns:
mutual friends
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#mutualfriends - Facebook Developers

getMutualFriends

ResponseList<Friend> getMutualFriends(String friendUserId,
                                      Reading reading)
                                      throws FacebookException
Returns the mutual friends between the current user and friend.

Parameters:
friendUserId - the ID of a friend
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
mutual friends
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#mutualfriends - Facebook Developers

getMutualFriends

ResponseList<Friend> getMutualFriends(String userId1,
                                      String userId2)
                                      throws FacebookException
Returns the mutual friends between two users.

Parameters:
userId1 - the ID of a user
userId2 - the ID of a user
Returns:
mutual friends
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#mutualfriends - Facebook Developers

getMutualFriends

ResponseList<Friend> getMutualFriends(String userId1,
                                      String userId2,
                                      Reading reading)
                                      throws FacebookException
Returns the mutual friends between two users.

Parameters:
userId1 - the ID of a user
userId2 - the ID of a user
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
mutual friends
Throws:
FacebookException - when Facebook service or network is unavailable
See Also:
User#mutualfriends - Facebook Developers

getTaggableFriends

ResponseList<TaggableFriend> getTaggableFriends()
                                                throws FacebookException
Returns the list of friends of the current user.

Returns:
taggable friend's list
Throws:
FacebookException - when Facebook service or network is unavailable, and when taggable friends feature requires app review
See Also:
User#taggablefriends - Facebook Developers

getTaggableFriends

ResponseList<TaggableFriend> getTaggableFriends(Reading reading)
                                                throws FacebookException
Returns the list of friends of the current user.

Parameters:
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
taggable friend's list
Throws:
FacebookException - when Facebook service or network is unavailable,and when taggable friends feature requires app review
See Also:
User#taggablefriends - Facebook Developers

getTaggableFriends

ResponseList<TaggableFriend> getTaggableFriends(String userId)
                                                throws FacebookException
Returns the list of friends of the current user.

Parameters:
userId - the ID of a user
Returns:
taggable friend's list
Throws:
FacebookException - when Facebook service or network is unavailable, and when taggable friends feature requires app review
See Also:
User#taggablefriends - Facebook Developers

getTaggableFriends

ResponseList<TaggableFriend> getTaggableFriends(String userId,
                                                Reading reading)
                                                throws FacebookException
Returns the list of friends of the current user.

Parameters:
userId - the ID of a user
reading - optional reading parameters. see Graph API#reading - Facebook Developers
Returns:
taggable friend's list
Throws:
FacebookException - when Facebook service or network is unavailable,and when taggable friends feature requires app review
See Also:
User#taggablefriends - Facebook Developers


Copyright © 2019. All rights reserved.