QueryFriends
AndroidiOSWindows
If you were looking for the method for use with Unreal Engine, see QueryFriends for Unreal Engine SDK.
If you were looking for the method for use with Unreal Engine, see QueryFriends for Unreal Engine SDK.
Obtains the channel friend list or the in-game friend list of the player.
info
Currently, Player Network SDK supports obtaining friend lists for Discord, Epic, Kakao, Switch, and Xbox Series X|S.
For Facebook, Garena, QQ, Steam, WeChat, and VK, friend lists can be obtained through the friend_list
backend API.
Channels | Android | iOS | Windows | Console |
---|---|---|---|---|
Discord | Supported | Supported | Not supported | Not supported |
Epic | Not supported | Not supported | Supported | Not supported |
Kakao | Supported | Supported | Not supported | Not supported |
Switch | Not supported | Not supported | Not supported | Supported |
Xbox Series X|S | 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 = "{}");
Input parameters
Parameter | Type | Description |
---|---|---|
page | int | The specified page of a friend to pull. |
count | int | The number of friends per page. |
isInGame | bool | Whether the friend is an in-game friend. true: In-game friend false: Not in-game friend |
channel | string | Channel definition Example: "Facebook" QQ Mobile and WeChat currently only provide backend APIs. This is to prevent unauthorized access to the relationship chain. |
extraJson | string | The extended field to pass additional data. |
Observers
The callback processing interface is FriendResultObserver. The callback data structure is FriendResult.
The callback methodID is INTL_FRIEND_QUERY_FRIENDS
.
Code sample
INTLAPI.QueryFriends(1, 10, true, INTLChannel.Facebook);