> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Snapchat API

> 使用 Snapchat API 發布內容的選項

## 發布到 Snapchat

Snapchat API 支援直接將內容發布到 Stories 與 Spotlight。
Stories 是 24 小時後就會消失的短暫貼文，而 Spotlight 貼文則為永久保留，可協助創作者與企業觸及更廣泛的受眾。

你可以在 Snapchat 上建立三種類型的貼文：

<ul className="custom-bullets">
  <li>[Stories](/apis/post/social-networks/snapchat#stories)</li>
  <li>[Saved Stories](/apis/post/social-networks/snapchat#saved-stories)</li>
  <li>[Spotlight](/apis/post/social-networks/snapchat#spotlight)</li>
</ul>

Snapchat 支援影片或圖片格式的媒體，且每則貼文只能包含一個媒體項目。

你可以透過以下資源進一步了解 Snapchat API：

<ul className="custom-bullets">
  <li>[Snapchat 媒體指南](/media-guidelines/snapchat) 與 [Snapchat 授權](/dashboard/connect-social-accounts/snapchat)。</li>
  <li>[Snapchat API 整合指南](https://www.ayrshare.com/blog/complete-guide-to-snapchat-api-integration/)：進一步了解如何在 Snapchat 上發布內容或取得分析資料。</li>
</ul>

## Stories

Stories 是短暫的 Snap，可讓好友、訂閱者以及非訂閱者在 Snapchat App 第 4 個分頁 Discover 動態中檢視，最長保留 24 小時。

發布 Snapchat story 的方式與其他貼文相同：

```json Publish a Snapchat story theme={"system"}
{
  "post": "An amazing story", // empty string is allowed
  "platforms": ["snapchat"],
  "mediaUrl": ["https://img.ayrshare.com/video.mp4"]
}
```

## Saved Stories

Saved Stories 是永久性的 Stories，可在 Public Profile 上長期檢視。

搭配 `snapChatOptions` 與 `savedStory` 選項來發布 Snapchat saved story：

```json Publish a Snapchat saved story theme={"system"}
{
  "post": "An amazing saved story",
  "platforms": ["snapchat"],
  "mediaUrl": ["https://img.ayrshare.com/video.mp4"],
  "snapChatOptions": {
    "savedStory": true
  }
}
```

## Spotlight

Spotlight 是永久性的影片 Snap，會透過 Snapchat 的使用者原創內容娛樂平台 Spotlight 進行分發與播放。
Spotlight 為創作者與企業提供了一個在 Snapchat 上擴大受眾的管道。

搭配 `snapChatOptions` 與 `spotlight` 選項來發布 Snapchat spotlight：

```json Publish a Snapchat spotlight theme={"system"}
{
  "post": "An amazing spotlight",
  "platforms": ["snapchat"],
  "mediaUrl": ["https://img.ayrshare.com/video.mp4"],
  "snapChatOptions": {
    "spotlight": true
  }
}
```

## Snapchat 提及

目前，透過 API 發布的 Spotlight 貼文中使用者提及（@username）並不會被解析成可互動的提及，這些文字會以純文字的方式顯示，不會產生可點擊的使用者連結。

```json Example with mentions (displays as plain text) theme={"system"}
{
  "post": "Check out this awesome content from @johndoe and @janedoe!",
  "platforms": ["snapchat"],
  "mediaUrl": ["https://img.ayrshare.com/image.jpg"],
  "snapChatOptions": {
    "spotlight": true
  }
}
```

## Snapchat 標籤

Spotlight 貼文完整支援 hashtag，有助於提升內容的曝光度。你可以在貼文內容中加入多個 hashtag 來為內容分類，並觸及相關受眾。這些 hashtag 也可以直接點擊。

```json Example with hashtags theme={"system"}
{
  "post": "Just launched our new product! 🚀 #ayrshare #tech #exciting",
  "platforms": ["snapchat"],
  "mediaUrl": ["https://img.ayrshare.com/product-launch.mp4"],
  "snapChatOptions": {
    "spotlight": true
  }
}
```

## 字元限制

更多資訊請參閱 [Snapchat 字元限制](/help-center/technical-support/character_limits#snapchat-character-limits)。
