CNContact.AddSocialProfile
--------------------------

Adds an social profile to a contact.

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

MBS( "CNContact.AddSocialProfile"; ContactIdentifier; Label; URLString; UserName; UserIdentifier; Service ) 

**MBS**( **"CNContact.AddSocialProfile";** /\* Adds an social profile to a contact. \*/  
**$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" \*/   
**$URLString**; /\* The URL of the service.e.g. "http://twitter.com/MBSPlugins" \*/   
**$UserName**; /\* The user name.e.g. "MBSPlugins" \*/   
**$UserIdentifier**; /\* The user idenitifer.e.g. "" \*/   
**$Service**) /\* The service name.  
For your convenience we accept here Facebook, Flickr, LinkedIn, MySpace, SinaWeibo, TencentWeibo, Twitter, Yelp and GameCenter to the correct constant.e.g. "Twitter" \*/ 

### 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" |
| URLString | The URL of the service. | "http://twitter.com/MBSPlugins" |
| UserName | The user name. | "MBSPlugins" |
| UserIdentifier | The user idenitifer. | "" |
| Service | The service name.   For your convenience we accept here Facebook, Flickr, LinkedIn, MySpace, SinaWeibo, TencentWeibo, Twitter, Yelp and GameCenter to the correct constant. | "Twitter" |

### Result

Returns OK or error.

### Description

Adds an social profile to a contact.  
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.AddEmailAddress](CNContactAddEmailAddress.md)
- [CNContact.AddInstantMessage](CNContactAddInstantMessage.md)
- [CNContact.AddPhoneNumber](CNContactAddPhoneNumber.md)
- [CNContact.AddSocialProfileJSON](CNContactAddSocialProfileJSON.md)
- [CNContactStore.AddContact](CNContactStoreAddContact.md)
- [CNContactStore.NewContact](CNContactStoreNewContact.md)
- [CNContactStore.UpdateContact](CNContactStoreUpdateContact.md)

### Example Databases

- [Mac and iOS/Contacts/Contacts](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/Contacts/Contacts.shtml#7ScriptAnchor_)

Created 1st August 2018 , last changed 3th August 2018

  
[CNContact.AddRelation](CNContactAddRelation.md) - [CNContact.AddSocialProfileJSON](CNContactAddSocialProfileJSON.md)

[HTML Version](CNContactAddSocialProfile.shtml)