> ## Documentation Index
> Fetch the complete documentation index at: https://learn.social.plus/llms.txt
> Use this file to discover all available pages before exploring further.

# Content Sharing

> Enable users to share content through customizable sharing interfaces with copy and native share options

<Info>
  **UIKit Component**: Sharing components are built on top of the social.plus
  UIKit, providing ready-to-use sharing interfaces with customizable copy and
  native share sheet functionality across all supported content types.
</Info>

## Feature Overview

The Sharing UIKit components provide comprehensive tools for enabling content sharing throughout your application. Users can share posts, profiles, communities, live streams, and events through two primary methods: copying shareable links or using native platform share sheets. These components integrate seamlessly across multiple pages and content types.

### Key Features

<CardGroup cols={2}>
  <Card title="Dual Share Options" icon="share">
    **Copy link and native sharing** - Copy shareable links to clipboard -
    Native platform share sheet integration - Consistent sharing experience
    across content types - Platform-optimized sharing workflows
  </Card>

  <Card title="Customizable Interface" icon="palette">
    **Flexible UI customization** - Custom icons and text labels - Page-specific
    configurations - Theme-consistent styling - Brand-aligned messaging
  </Card>
</CardGroup>

<div style={{ textAlign: "center", margin: "40px 0" }}>
  <img src="https://mintcdn.com/social-b97141fb/kWNNKNR8GYxoXE90/images/uikit-shareable-link.png?fit=max&auto=format&n=kWNNKNR8GYxoXE90&q=85&s=d5d1cddf3acff7628571c04dced7ec72" alt="UIKit Sharing Interface" style={{ maxWidth: "100%", height: "auto" }} width="600" height="554" data-path="images/uikit-shareable-link.png" />
</div>

The sharing functionality is available across these key areas of your application:

| Location                    | Share Types       | Description                                          |
| --------------------------- | ----------------- | ---------------------------------------------------- |
| **User Profile Page**       | Profile links     | Share user profiles for networking and discovery     |
| **Community Profile Page**  | Community links   | Share community pages to grow membership             |
| **Post Content Component**  | Post links        | Share individual posts across all post types         |
| **Post Detail Page**        | Post links        | Share posts from detailed view                       |
| **Live Stream Player Page** | Live stream links | Share active live streams                            |
| **Create Live Stream Page** | Live stream links | Share live stream setup and promotion                |
| **Clip Feed Page**          | Clip links        | Share video clips from feed views                    |
| **Event Detail Page**       | Event links       | Share events from the event detail page's 3-dot menu |

## Customization

<Tabs>
  <Tab title="User Profile Sharing">
    Enable sharing for user profiles and networking

    User profile sharing allows users to share their own profiles or other users' profiles for networking, collaboration, and community building purposes.

    #### Customization Options

    | Config ID                        | Type    | Description                          |
    | -------------------------------- | ------- | ------------------------------------ |
    | `user_profile_page/*/share_link` | Element | Customize share button icon and text |
    | `user_profile_page/*/copy_link`  | Element | Customize copy button icon and text  |
  </Tab>

  <Tab title="Community Sharing">
    Enable sharing for communities and growth

    Community sharing facilitates community discovery and growth by allowing users to share community links through multiple channels.

    #### Customization Options

    | Config ID                             | Type    | Description                          |
    | ------------------------------------- | ------- | ------------------------------------ |
    | `community_profile_page/*/share_link` | Element | Customize share button icon and text |
    | `community_profile_page/*/copy_link`  | Element | Customize copy button icon and text  |
  </Tab>

  <Tab title="Post Content Sharing">
    Enable sharing for all post types

    Post content sharing allows users to share individual posts across all supported post types, including text, image, video, clip, and live stream posts.

    #### Customization Options

    | Config ID                       | Type    | Description                                               |
    | ------------------------------- | ------- | --------------------------------------------------------- |
    | `*/post_content/share_link`     | Element | Customize share button icon and text for post components  |
    | `*/post_content/copy_link`      | Element | Customize copy button icon and text for post components   |
    | `post_detail_page/*/share_link` | Element | Customize share button icon and text for post detail page |
    | `post_detail_page/*/copy_link`  | Element | Customize copy button icon and text for post detail page  |
  </Tab>

  <Tab title="Live Stream Sharing">
    Enable sharing for live streaming content

    Live stream sharing allows users to share live streaming content both during stream creation and while viewing active streams.

    #### Customization Options

    | Config ID                             | Type    | Description                                   |
    | ------------------------------------- | ------- | --------------------------------------------- |
    | `livestream_player_page/*/share_link` | Element | Customize share button for live stream player |
    | `livestream_player_page/*/copy_link`  | Element | Customize copy button for live stream player  |
    | `create_livestream_page/*/share_link` | Element | Customize share button for stream creation    |
    | `create_livestream_page/*/copy_link`  | Element | Customize copy button for stream creation     |
    | `clip_feed_page/*/share_link`         | Element | Customize share button for clip feeds         |
    | `clip_feed_page/*/copy_link`          | Element | Customize copy button for clip feeds          |
  </Tab>

  <Tab title="Event Sharing">
    Enable sharing for events

    Event sharing adds **Copy event link** (all platforms) and **Share to** (mobile only) to the event detail page's 3-dot action menu. Visibility follows the network shareable-link configuration and the event's community type — see [Event → Share an event](/uikit/components/social/event#share-an-event).

    #### Customization Options

    | Config ID               | Type | Description                           |
    | ----------------------- | ---- | ------------------------------------- |
    | `event_detail_page/*/*` | Page | Customize the event detail page theme |

    The Copy / Share actions are menu items rather than standalone elements — customize their labels through [localization](/uikit/customization/localization) (`amity_social_button_copy_event_link`, `amity_social_button_share_to`).
  </Tab>
</Tabs>

## Best Practices

<AccordionGroup>
  <Accordion title="User Experience">
    * **Clear Visual Feedback**: Provide immediate feedback when links are copied
    * **Consistent Placement**: Position share options consistently across similar content types
    * **Contextual Messaging**: Use content-specific share messages and labels
    * **Accessibility**: Ensure share buttons are accessible with proper labels and touch targets
  </Accordion>

  {" "}

  <Accordion title="Customization Strategy">
    * **Brand Consistency**: Use consistent icons and messaging that match your
      brand - **Platform Optimization**: Customize labels for platform-specific
      sharing conventions - **Content Context**: Tailor share messages to the
      specific content being shared - **User Guidance**: Use clear, action-oriented
      text for share and copy buttons
  </Accordion>

  <Accordion title="Performance">
    * **Lazy Link Generation**: Generate share links only when sharing is initiated
    * **Error Handling**: Implement graceful error handling for failed share operations
    * **Network Optimization**: Cache share configurations to minimize API calls
    * **Background Processing**: Handle link generation without blocking the UI
  </Accordion>
</AccordionGroup>

## Common Use Cases

* **Content Virality**: Enable easy sharing to increase content reach and engagement
* **Community Growth**: Share community links to attract new members and expand reach
* **User Acquisition**: Use profile sharing for networking and user discovery
* **Live Engagement**: Share live streams to maximize viewer participation
* **Content Discovery**: Share interesting posts to help users discover new content

## Troubleshooting

<AccordionGroup>
  <Accordion title="Share Button Not Appearing" icon="eye-slash">
    **Problem**: Share buttons are not visible in expected locations

    **Solutions**:

    * Verify sharing functionality is enabled in your app configuration
    * Check that URL patterns are properly configured in the social.plus console
    * Ensure proper authentication and permissions for content access
    * Validate that the content exists and is accessible

    ```swift theme={null}
    // Verify share configuration
    let config = AmityUIKitManager.getShareConfiguration()
    if config.isEnabled {
        // Sharing should be available
    }
    ```
  </Accordion>

  <Accordion title="Copy to Clipboard Failures" icon="clipboard-xmark">
    **Problem**: Copy to clipboard functionality not working

    **Solutions**:

    * Check clipboard permissions on the platform
    * Verify that the generated link is valid
    * Ensure proper error handling for clipboard operations
    * Test on different devices and platforms

    ```typescript theme={null}
    try {
      await navigator.clipboard.writeText(shareLink);
      // Show success feedback
    } catch (error) {
      // Handle clipboard permission or other errors
      console.error('Copy failed:', error);
    }
    ```
  </Accordion>

  <Accordion title="Native Share Sheet Issues" icon="share-from-square">
    **Problem**: Native share sheet not opening or functioning correctly

    **Solutions**:

    * Verify platform-specific share sheet permissions
    * Check that the content and link are properly formatted
    * Ensure the app has proper entitlements for sharing
    * Test with different content types and platforms

    ```swift theme={null}
    // iOS share sheet validation
    if UIActivityViewController.canPerform(activity: .postToFacebook) {
        // Share sheet should work
    }
    ```
  </Accordion>
</AccordionGroup>

## Related Components

<CardGroup cols={3}>
  <Card title="User Profiles" href="/uikit/components/social/users" icon="user">
    Learn about user profile components and profile sharing
  </Card>

  <Card title="Communities" href="/uikit/components/social/communities" icon="users">
    Discover community components and community sharing
  </Card>

  <Card title="Posts & Media" href="/uikit/components/social/posts" icon="photo-film">
    Explore post components and content sharing options
  </Card>

  <Card title="Live Streaming" href="/uikit/components/social/livestreaming" icon="video">
    Learn about live streaming and stream sharing features
  </Card>

  <Card title="Social Feeds" href="/uikit/components/social/feeds" icon="newspaper">
    Understand feed components and inline sharing
  </Card>

  <Card title="Events" href="/uikit/components/social/event" icon="calendar">
    Explore event components and event link sharing
  </Card>

  <Card title="SDK Content Sharing" href="/social-plus-sdk/social/content-management/content-sharing" icon="code">
    Learn about the underlying SDK sharing implementation
  </Card>
</CardGroup>

<Tip>
  **Implementation Strategy**: Start by enabling sharing in high-engagement
  areas like post feeds and user profiles. Configure consistent branding and
  messaging across all sharing locations. Test both copy and native share
  functionality on all target platforms. Consider analytics tracking to
  understand which sharing methods users prefer and optimize accordingly.
</Tip>
