Skip to main content

Query Channel Friend List (QueryFriends)

AndroidiOSPC

If you are using Unreal Engine, refer to QueryFriends in 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 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
EpicUnsupportedUnsupportedSupportedUnsupported
KakaoSupportedSupportedUnsupportedUnsupported
SwitchUnsupportedUnsupportedUnsupportedSupported
Xbox Series X|SUnsupportedUnsupportedUnsupportedSupported
WinGDKUnsupportedUnsupportedUnsupportedSupported

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);