AttachTwitterIdentity
Attach the user's Twitter credentials to the current profile.
Service | Operation |
---|---|
identity | ATTACH |
Method Parameters
Parameter | Description |
---|---|
twitterId | String representation of a Twitter user ID |
authenticationToken | The authentication token derived via the Twitter API |
secret | The secret given when attempting to link with Twitter |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
string twitterId = "someId";
string token = "someToken";
string secret = "someSecret";
_bc.IdentityService.AttachTwitterIdentity(
twitterId,
token,
secret,
SuccessCallback, FailureCallback);
const char * twitterId = "someId";
const char * token = "someToken";
const char * secret = "secret";
_bc->getIdentityService()->attachTwitterIdentity(
twitterId, token, secret, this);
- (void)attachTwitterIdentity:(NSString *)twitterId
authenticationToken:(NSString *)token
secret:(NSString *)secret
completionBlock:(BCCompletionBlock)cb
errorCompletionBlock:(BCErrorCompletionBlock)ecb
cbObject:(BCCallbackObject)cbObject;
public void attachTwitterIdentity(
String twitterId,
String authenticationToken,
String secret,
IServerCallback callback)
_bc.identity.attachTwitterIdentity = function(twitterId, authenticationToken, secret, callback)
var twitterId = "someId";
var authenticationToken = "someToken";
ServerResponse result = await _bc.identityService.attachTwitterIdentity(twitterId:twitterId, authenticationToken:authenticationToken);
if (result.statusCode == 200) {
print("Success");
} else {
print("Failed ${result.error['status_message'] ?? result.error}");
}
// N/A
// N/A
JSON Response
{
"status": 200,
"data": null
}
Common Error Code
Status Codes
Code | Name | Description |
---|---|---|
40211 | DUPLICATE_IDENTITY_TYPE | Returned when trying to attach an identity type that already exists for that profile. For instance you can have only one Twitter identity for a profile. |
40212 | MERGE_PROFILES | Returned when trying to attach an identity type that would result in two profiles being merged into one (for instance an anonymous account and a Twitter account). |