Query Channel Friend List (QueryFriends)
Get a list of a player's channel friends, or in-game play friends list.
info
The Player Network SDK currently supports fetching channel friend lists for Discord, Epic, Kakao, Switch, and Xbox Series X|S.
Third-party channel play friend lists can be obtained through the backend interface friend_list for channels like Facebook, Garena, QQ, Steam, WeChat, and VK.
| Channel | Android | iOS | Windows | Console |
|---|---|---|---|---|
| Discord | Supported | Supported | Unsupported | Unsupported |
| Epic | Unsupported | Unsupported | Supported | Unsupported |
| Kakao | Supported | Supported | Unsupported | Unsupported |
| Switch | Unsupported | Unsupported | Unsupported | Supported |
| Xbox Series X|S | Unsupported | Unsupported | Unsupported | Supported |
| WinGDK | Not supported | Not supported | Not supported | Supported |
Function Definition
public static void QueryFriends(int page = 0, int count = 0, bool isInGame = true, string channel = "", string extraJson = "{}");
Parameter Details
| Parameters | Type | Explanation |
|---|---|---|
| page | int | Which page of friends to fetch |
| count | int | Number of friends per page |
| isInGame | bool | Is it in-game friends true means playing friends otherwise vice versa |
| channel | string | Channel definition Example: "Facebook" QQ and WeChat currently only offer backend API.This is to prevent unauthorized access to the relationship chain. |
| extraJson | String | Extended interface, passing data transparently |
Callback processing
The callback handler interface is FriendResultObserver.The callback data structure is FriendResult.
The callback ID is INTL_FRIEND_QUERY_FRIENDS.
Code example
INTLAPI.QueryFriends(1, 10, true, INTLChannel.Facebook);