Skip to main content
Version: 5.7.0

AddFriendsFromPlatform

Links the profiles for the specified externalIds for the given friend platform as internal friends.

ServiceOperation
friendADD_FRIENDS_FROM_PLATFORM

Method Parameters

ParameterDescription
friendPlatformFriend platform to query. Valid values are "Facebook", "Steam", and "PlaystationNetwork"
mode"ADD" to add friends only, "SYNC" to delete any previously saved friends that are not in the externalIds list
externalIdsThe list of platform-specific external IDs of the friends to add

Usage

http://localhost:3000
string friendPlatform = "Facebook";
string mode = "ADD";
string[] externalIds = { "external Id 1", "external Id 2" };
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.FriendService.AddFriendsFromPlatform(friendPlatform, mode, externalIds, successCallback, failureCallback);
JSON Response
{
"data": {
"server_time": 1623090934620,
"rejected": [],
"numRejected": 0,
"numNewAdded": 2,
"numDeleted": 0,
"numExisting": 0
},
"status": 200
}