CNContact.AddSocialProfileJSON
------------------------------

Adds an social profile to a contact with JSON.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Contacts](component_Contacts.md) | [8.4](newinversion84.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "CNContact.AddSocialProfileJSON"; ContactIdentifier; Label; JSON ) 

**MBS**( **"CNContact.AddSocialProfileJSON";** /\* Adds an social profile to a contact with JSON. \*/  
**$ContactIdentifier**; /\* The contact identifier.e.g. "46B1E34D-58F9-4B6B-A80D-0F71ABB87A0E" \*/   
**$Label**; /\* The label to use.  
For your convenience we translate Work, Home and Other to the right values, so they get localized in display.  
Default label is Other.e.g. "Work" \*/   
**$JSON**) /\* The JSON with the object containing the fields urlString, username, userIdentifier and service. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| ContactIdentifier | The contact identifier. | "46B1E34D-58F9-4B6B-A80D-0F71ABB87A0E" |
| Label | The label to use.   For your convenience we translate Work, Home and Other to the right values, so they get localized in display.   Default label is Other. | "Work" |
| JSON | The JSON with the object containing the fields urlString, username, userIdentifier and service. |  |

### Result

Returns OK or error.

### Description

Adds an social profile to a contact with JSON.  
This is a convenience function to add just one social profile with a given label to the contact.  
Please call [CNContactStore.UpdateContact](CNContactStoreUpdateContact.md) later to store the values.  
### See also

- [CNContact.AddSocialProfile](CNContactAddSocialProfile.md)
- [CNContactStore.UpdateContact](CNContactStoreUpdateContact.md)

Created 1st August 2018 , last changed 2nd August 2018

  
[CNContact.AddSocialProfile](CNContactAddSocialProfile.md) - [CNContact.AddURLAddress](CNContactAddURLAddress.md)

[HTML Version](CNContactAddSocialProfileJSON.shtml)