Skip to main content
Version: 5.7.0

GetPresenceOfFriends

Gets the presence data for the given platform. Can be one of "all", "brainCloud", or "facebook". Will not include offline profiles unless includeOffline is set to true.

ServiceOperation
presenceGET_PRESENCE_OF_FRIENDS

Method Parameters

ParameterDescription
platformGets a list of Presence entries for the specified platform or "all" for all platforms.
includeOfflineShould offline users be included in the response?

Usage

http://localhost:3000
string platform = brainCloud;
bool includeOffline = true;
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};

_bc.PresenceService.GetPresenceOfFriends(platform, includeOffline, successCallback, failureCallback);
JSON Response
{
"data": {
"presence": [
{
"user": {
"id": <%= data.example.profileId %>,
"name": <%= data.example.playerName %>,
"pic": null,
"cxs": [
"22284:fb416888-e76d-425d-a06d-a5529bdba8d9:id58ohotujj893gomctos244al"
]
},
"online": true,
"summaryFriendData": {},
"activity": {
"LOCATION": "POKER_TABLE",
"STATUS": "PLAYING_GAME"
}
}
]
},
"status": 200
}