Skip to main content
Version: 5.7.0

ListFriends

Retrieves a list of user and friend platform information for all friends of the current user.

ServiceOperation
friendLIST_FRIENDS

Method Parameters

ParameterDescription
friendPlatformFriend platform to query. Valid values are "Facebook", "PlaystationNetwork", "Steam", "brainCloud" and "All".
includeSummaryDataTrue if including summary data; false otherwise.

Usage

http://localhost:3000
FriendPlatform friendPlatform = FriendPlatform.Facebook;
bool includeSummaryData = 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.Friend.ListFriends(friendPlatform, includeSummaryData, successCallback, failureCallback);
JSON Response
// Example 1: for friendPlatform = All
{
"status": 200,
"data": {
"friends": [
{
"externalData": {
"Facebook": {
"pictureUrl": "https://scontent.xx.fbcdn.net/hprofile-xfp1/v/t1.0-1/p50x50/XXX.jpg?oh=YYY&oe=ZZZ",
"name": "scientist at large",
"externalId": "100003668521730"
},
"brainCloud": {}
},
"friendPlatforms" : ["Facebook", "brainCloud"],
"playerId": "1aa3428c-5877-4624-a909-f2b1af931f00",
"name": "Mr. Peabody",
"summaryFriendData": {
"LEVEL": -4
},
"pictureUrl": "www.exampleurl.com"
},
{
"externalData": {
"Facebook": {
"pictureUrl": "https://scontent.xx.fbcdn.net/hprofile-xfa1/v/t1.0-1/c0.11.50.50/p50x50/3AAA.jpg?oh=BBBa&oe=CCC",
"name": "Aquaman",
"externalId": "100003509724516"
}
},
"friendPlatforms" : ["Facebook"],
"playerId": "1598c5b6-1b09-431b-96bc-9c2c928cad3b",
"name": null,
"summaryFriendData": {
"LEVEL": 1
},
"pictureUrl": "www.exampleurl.com"
}
],
"server_time": 1458224807855
}
}

// Example 2: for friendPlatform = Facebook
{
"status": 200,
"data": {
"friends": [
{
"externalData": {
"Facebook": {
"pictureUrl": "https://scontent.xx.fbcdn.net/hprofile-xfp1/v/t1.0-1/p50x50/XXX.jpg?oh=YYY&oe=ZZZ",
"name": "scientist at large",
"externalId": "100003668521730"
}
},
"friendPlatforms" : ["Facebook"],
"playerId": "1aa3428c-5877-4624-a909-f2b1af931f00",
"name": "Mr. Peabody",
"summaryFriendData": {
"LEVEL": -4
}
},
{
"externalData": {
"Facebook": {
"pictureUrl": "https://scontent.xx.fbcdn.net/hprofile-xfa1/v/t1.0-1/c0.11.50.50/p50x50/3AAA.jpg?oh=BBBa&oe=CCC",
"name": "Aquaman",
"externalId": "100003509724516"
}
},
"friendPlatforms" : ["Facebook"],
"playerId": "1598c5b6-1b09-431b-96bc-9c2c928cad3b",
"name": null,
"summaryFriendData": {
"LEVEL": 1
}
}
],
"server_time": 1458224807855
}
}