> ## 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.

# Bluesky API

> 使用 Bluesky API 发布内容的选项

export const PlansAvailable = ({plans = [], maxPackRequired}) => {
  let displayPlans = plans;
  if (plans && plans.length === 1) {
    const lowerCasePlan = plans[0].toLowerCase();
    if (lowerCasePlan === "business") {
      displayPlans = ["Launch", "Business", "Enterprise"];
    } else if (lowerCasePlan === "premium") {
      displayPlans = ["Premium", "Launch", "Business", "Enterprise"];
    }
  }
  return <Note>
Available on {displayPlans.length === 1 ? "the " : ""}
{displayPlans.join(", ").replace(/\b\w/g, l => l.toUpperCase())}{" "}
{displayPlans.length > 1 ? "plans" : "plan"}.

{maxPackRequired && <span onClick={() => window.open('https://www.ayrshare.com/docs/additional/maxpack', '_self')} className="flex items-center mt-2 cursor-pointer">
 <span className="px-1.5 py-0.5 rounded text-sm" style={{
    backgroundColor: '#C264B6',
    color: 'white',
    fontSize: '12px'
  }}>
   Max Pack required
 </span>
</span>}
</Note>;
};

## 发布到 Bluesky

使用 Bluesky API 发布带有链接、话题标签和图片/视频的基本帖子的 JSON。
更多信息请参见 [Bluesky 媒体指南](/media-guidelines/bluesky) 和 [Bluesky 授权](/dashboard/connect-social-accounts/bluesky)：

<CodeGroup>
  ```json Bluesky Post with Image theme={"system"}
  {
    "post": "The best Bluesky image post ever #best", // Max 300 characters or empty string
    "mediaUrls": ["https://img.ayrshare.com/012/gb.jpg"],
    "platforms": ["bluesky"]
  }
  ```

  ```json Bluesky Post with Video theme={"system"}
  {
    "post": "The best Bluesky video post ever https://www.google.com", // Max 300 characters or empty string
    "mediaUrls": ["https://img.ayrshare.com/012/vid.mp4"],
    "platforms": ["bluesky"]
  }
  ```
</CodeGroup>

### Bluesky 支持的功能

<ul class="custom-bullets">
  <li>Bluesky 支持文本、图片（最多 4 张）、视频（仅 1 个），以及包含链接或表情符号的帖子。</li>
  <li>单个帖子中最多可以发送 4 张图片或 1 个视频。</li>
  <li>帖子文本限制为 300 个字符。</li>
  <li>支持动态 GIF，并作为视频发送。</li>
  <li>Bluesky 支持话题标签和提及（@handle）。</li>
  <li>图片或视频上的替代文本（Alt Text）。</li>
  <li>更多信息请参见 [Bluesky 媒体指南](/media-guidelines/bluesky)。</li>

  <li>
    支持帖子中的链接预览。在帖子文本中包含链接，Ayrshare API 将
    自动为帖子添加链接预览。
  </li>
</ul>

### Bluesky 不支持的功能

<ul class="custom-bullets">
  <li>Bluesky 尚不支持视频缩略图。</li>
</ul>

## Bluesky 提及

通过在帖子文本中添加 `@handle` 来提及其他 Bluesky 用户。例如：

```json Bluesky Post with Mention theme={"system"}
{
  "post": "The best Bluesky image post ever @handle",
  "platforms": ["bluesky"]
}
```

<Warning>
  请查看提及功能的[重要规则](/testing/post-verification#mentions)。
</Warning>

## 替代文本

为图片或视频添加 Bluesky 替代文本（也称为 alt text）。
Bluesky 替代文本是一项无障碍功能，用于提供附加的用户信息并支持屏幕阅读器。

在 `blueSkyOptions` 对象中使用 `altText`。

```json Bluesky Alt Text theme={"system"}
{
  "blueSkyOptions": {
    // Array of Alt Texts
    "altText": ["This is my best pic", "😃 here is the next one"]
  }
}
```

每条替代文本必须对应 `mediaUrls` 数组中的一张图片或一个视频。
替代文本将按顺序应用于每个媒体项。

## 字符限制

更多信息请参见 [Bluesky 字符限制](/help-center/technical-support/character_limits#bluesky-character-limits)。
