GetExternalIdForProfileId
Retrieves the external ID for the specified user profile ID on the specified social platform.
Does not require the calling user to be a friend of the other user.
Service | Operation |
---|---|
friend | GET_EXTERNAL_ID_FOR_PROFILE_ID |
Method Parameters
Parameter | Description |
---|---|
profileId | Profile (user) ID. |
authenticationType | Associated authentication type. Full list of types can be found here. |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string profileId = "profileId";
AuthenticationType authenticationType = AuthenticationType.Facebook;
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.GetExternalIdForProfileId(profileId, authenticationType, successCallback, failureCallback);
const char *profileId = "profileId";
AuthenticationType authenticationType = AuthenticationType::Facebook;
_bc->getFriend()->getExternalIdForProfileId(profileId, authenticationType, this);
NSString *profileId = @"profileId";
AuthenticationTypeObjc *authenticationType = [AuthenticationTypeObjc Facebook];
BCCompletionBlock successBlock; // define callback
BCErrorCompletionBlock failureBlock; // define callback
[[_bc friendService] getExternalIdForProfileId:profileId
authenticationType:authenticationType
completionBlock:successBlock
errorCompletionBlock:failureBlock
cbObject:nil];
String profileId = "profileId";
AuthenticationType authenticationType = AuthenticationType.Facebook;
this; // implements IServerCallback
_bc.getFriend().getExternalIdForProfileId(profileId, authenticationType, this);
public void serverCallback(ServiceName serviceName, ServiceOperation serviceOperation, JSONObject jsonData)
{
System.out.print(String.format("Success | %s", jsonData.toString()));
}
public void serverError(ServiceName serviceName, ServiceOperation serviceOperation, int statusCode, int reasonCode, String jsonError)
{
System.out.print(String.format("Failed | %d %d %s", statusCode, reasonCode, jsonError.toString()));
}
var profileId = "profileId";
var authenticationType = "Facebook";
_bc.friend.getExternalIdForProfileId(profileId, authenticationType, result =>
{
var status = result.status;
console.log(status + " : " + JSON.stringify(result, null, 2));
});
var profileId = "profileId";
var authenticationType = AuthenticationType.facebook;
ServerResponse result = await _bc.friendService.getExternalIdForProfileId(profileId:profileId, authenticationType:authenticationType);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
var profileId = "profileId";
var authenticationType = "Facebook";
var friendProxy = bridge.getFriendServiceProxy();
var postResult = friendProxy.getExternalIdForProfileId(profileId, authenticationType);
if (postResult.status == 200) {
// Success!
}
{
"service": "friend",
"operation": "GET_EXTERNAL_ID_FOR_PROFILE_ID",
"data": {
"profileId": "profileId",
"authenticationType": "Facebook"
}
}
JSON Response
{
"status": 200,
"data": {
"externalId": "19e1c0cf-9a2d-4d5c-9a71-1b0f6b309b4b"
}
}