Skip to main content

QueryFriends

AndroidiOSWindows
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.

ChannelsAndroidiOSWindowsConsole
DiscordSupportedSupportedNot supportedNot supported
EpicNot supportedNot supportedSupportedNot supported
KakaoSupportedSupportedNot supportedNot supported
SwitchNot supportedNot supportedNot supportedSupported
Xbox Series X|SNot supportedNot supportedNot supportedSupported

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

ParameterTypeDescription
ChannelEINTLLoginChannelChannel definition
Example: "Epic"
Pageint32The specified page of a friend to pull.
Countint32The number of friends per page.
IsInGameboolWhether the friend is an in-game friend.
true: In-game friend
false: Not in-game friend
ExtraJsonFStringThe 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);