Skip to main content

Query Channel Friend List (QueryFriends)

AndroidiOSWindows
If you're using Unreal Engine, see QueryFriends for the Unreal Engine SDK.

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.

ChannelAndroidiOSWindowsConsole
DiscordSupportedSupportedUnsupportedUnsupported
EpicUnsupportedUnsupportedSupportedUnsupported
KakaoSupportedSupportedUnsupportedUnsupported
SwitchUnsupportedUnsupportedUnsupportedSupported
Xbox Series X|SUnsupportedUnsupportedUnsupportedSupported
WinGDKNot supportedNot supportedNot supportedSupported

Function Definition

public static void QueryFriends(int page = 0, int count = 0, bool isInGame = true, string channel = "", string extraJson = "{}");

Parameter Details

ParametersTypeExplanation
pageintWhich page of friends to fetch
countintNumber of friends per page
isInGameboolIs it in-game friends
true means playing friends
otherwise vice versa
channelstringChannel definition
Example: "Facebook"
QQ and WeChat currently only offer backend API.This is to prevent unauthorized access to the relationship chain.
extraJsonStringExtended 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);