QueryFriends
AndroidiOSWindows
If you were looking for the method for use with Unity, see QueryFriends for Unity SDK.
If you were looking for the method for use with Unity, see QueryFriends for Unity 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
UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static bool QueryFriends(
const EINTLLoginChannel Channel,
const int32 Page = 0,
const int32 Count = 0,
const bool IsInGame = true,
const FString ExtraJson = "{}");
Input parameters
Parameter | Type | Description |
---|---|---|
Channel | EINTLLoginChannel | Channel definition Example: "Epic" |
Page | int32 | The specified page of a friend to pull. |
Count | int32 | 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 |
ExtraJson | FString | The extended field to pass additional data. |
Observers
The callback processing interface is FriendResultObserver. The callback data structure is FriendResult.
The callback methodID is kMethodIDFriendQueryFriends
.
Code sample
UINTLSDKAPI::QueryFriends(EINTLLoginChannel::kChannelEpic);