Skip to main content

QueryFriends

[Player Network SDK & MSDK] Obtains the channel friend list or the in-game friend list of the player.

info
  • Currently, the client only supports friends list enquiries for Epic. Other channels need to be done with backend API.
  • [Player Network SDK Only] Facebook channel can obtain the friends list with API: Facebook Friends.

Supported Platform​

Supports Android, iOS, Windows platform.
note

MSDK currently does not support Windows.

Function Definition​

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

Input Parameters​

ParameterTypeDescription
pageintThe specified page of a friend to pull
countintThe number of friends per page
isInGameboolWhether the friend is an in-game friend.
true: In-game friend
false: Not in-game friend
channelstringChannel definition
Example: "Facebook"
QQ Mobile and WeChat currently only provide backend APIs. This is to prevent unauthorized access to the relationship chain.
subChannelstringSub channel
extraJsonstringThe extended field to pass additional data

Callback Processing​

The callback processing API is GUAQuereyFriendObserver. The callback data structure is GUAFriendResult.

The callback event is QuereyFriendEvents. The callback methodID is GUA_FRIEND_QUERY_FRIENDS.

Code Sample​

UnionAdapterAPI.GetFriendService().QueryFriends();