<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Contacts",
  "identifier" : "/documentation/Contacts/CNSocialProfile",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Contacts"
    ],
    "preciseIdentifier" : "c:objc(cs)CNSocialProfile"
  },
  "title" : "CNSocialProfile"
}
-->

# CNSocialProfile

An immutable object that represents one of the user’s social profiles.

```
class CNSocialProfile
```

## Overview

Some social profile services, such as Facebook and Twitter, are predefined in this class. You can also specify your own social profile service with the [`init(urlString:username:userIdentifier:service:)`](/documentation/Contacts/CNSocialProfile/init(urlString:username:userIdentifier:service:)) method.

`CNSocialProfile` objects are thread-safe, and you may access their properties from any thread of your app.

## Topics

### Creating a Social Profile Object

[`init(urlString:username:userIdentifier:service:)`](/documentation/Contacts/CNSocialProfile/init(urlString:username:userIdentifier:service:))

Initializes a new social profile object with the specified URL.

### Getting Social Profile Information

[`username`](/documentation/Contacts/CNSocialProfile/username)

The user name for the social profile.

[`service`](/documentation/Contacts/CNSocialProfile/service)

The social profile’s service name.

[`urlString`](/documentation/Contacts/CNSocialProfile/urlString)

The URL associated with the social profile.

[`userIdentifier`](/documentation/Contacts/CNSocialProfile/userIdentifier)

The service’s user identifier associated with the social profile.

### Getting Localized User Profile Information

[`localizedString(forKey:)`](/documentation/Contacts/CNSocialProfile/localizedString(forKey:))

Returns the localized name of the property for the specified key.

[`CNSocialProfileUsernameKey`](/documentation/Contacts/CNSocialProfileUsernameKey)

The social profile user name.

[`CNSocialProfileServiceKey`](/documentation/Contacts/CNSocialProfileServiceKey)

The social profile service.

[`CNSocialProfileURLStringKey`](/documentation/Contacts/CNSocialProfileURLStringKey)

The social profile URL.

[`CNSocialProfileUserIdentifierKey`](/documentation/Contacts/CNSocialProfileUserIdentifierKey)

The social profile user identifier.

### Getting Localized Service Names

[`localizedString(forService:)`](/documentation/Contacts/CNSocialProfile/localizedString(forService:))

Returns the localized name of the specified service.

[`CNSocialProfileServiceFacebook`](/documentation/Contacts/CNSocialProfileServiceFacebook)

The Facebook social profile service.

[`CNSocialProfileServiceFlickr`](/documentation/Contacts/CNSocialProfileServiceFlickr)

The Flickr social profile service.

[`CNSocialProfileServiceGameCenter`](/documentation/Contacts/CNSocialProfileServiceGameCenter)

The Game Center social profile service.

[`CNSocialProfileServiceLinkedIn`](/documentation/Contacts/CNSocialProfileServiceLinkedIn)

The LinkedIn social profile service.

[`CNSocialProfileServiceMySpace`](/documentation/Contacts/CNSocialProfileServiceMySpace)

The MySpace social profile service.

[`CNSocialProfileServiceSinaWeibo`](/documentation/Contacts/CNSocialProfileServiceSinaWeibo)

The Sina Weibo social profile service.

[`CNSocialProfileServiceTencentWeibo`](/documentation/Contacts/CNSocialProfileServiceTencentWeibo)

The Tencent Weibo social profile service.

[`CNSocialProfileServiceTwitter`](/documentation/Contacts/CNSocialProfileServiceTwitter)

The Twitter social profile service.

[`CNSocialProfileServiceYelp`](/documentation/Contacts/CNSocialProfileServiceYelp)

The Yelp social profile service.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)