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

# 如何处理重复帖子 | Ayrshare 文档

> 了解在使用 API 时为何会出现重复的社交媒体帖子，以及如何借助 Ayrshare 的重复帖子防护机制预防并解决此类问题。

如果你看到重复的帖子并有两个帖子 ID，最有可能的原因是你不小心发起了两次相同的 API 发帖请求。
我们的系统会检查重复的帖子，因此第二个帖子应被拦截。
但如果两个帖子几乎在同一时刻发出，两者都可能被发布。

如果你需要查找重复的帖子，可以参考[发帖响应中的详情](/help-center/technical-support/dealing_with_duplicate_posts#find-the-duplicate-post)。

你可以通过以下几种方式验证是否发起了两次发帖调用。

## 检查你的系统日志

最好的起点是你自己的系统日志和代码。

<ul className="custom-list">
  <li>在日志中查找 API 发帖请求和响应，看是否存在两次请求。</li>

  <li>
    确认发帖请求没有意外的自动
    重试。例如，如果请求响应耗时超过 30 秒，系统会自动重试该请求 ——
    有时较大的图片或视频需要更长时间才能被社交平台处理。
  </li>
</ul>

## 使用 Ayrshare 控制台

进入 Ayrshare 控制台，切换到相关的 User Profile。然后，在搜索框中搜索帖子 ID。仅会加载最近 100 个帖子，因此你可能需要加载更多才能找到目标帖子 ID。

展开 *API Request & Response* 折叠面板，Request 部分包含请求的<i>创建时间</i>。
对比两个帖子的时间，判断它们是否在不同时刻发送。
两个不同的帖子 ID 也表明发出了两次不同的 API 请求。

以上步骤应能帮助你判断重复帖子产生的原因。如需协助，请随时告诉我们。

## 找到重复的帖子

发帖响应中包含所找到重复帖子的详情。

例如：

```json Duplicate Post Details theme={"system"}
{
  "errors": [
    {
      "action": "post",
      "status": "error",
      "code": 137,
      "message": "Duplicate or similar content posted within the same two day period. The social networks prohibit duplicate content and ban accounts that do not comply. https://www.ayrshare.com/docs/help-center/technical-support/dealing_with_duplicate_posts#dealing-with-duplicate-posts",
      "details": "Duplicate found in user profile: John Profile, post id: pRo7vkM1vYVMJu8sJa, and refId: ace4bcd07336582e2fd9",
      "platform": "facebook"
    }
  ]
}
```

你可以使用 `post id` 和 `refId` 在 Ayrshare 控制台中查找重复的帖子（务必先切换到对应的 User Profile），或使用 [history API 端点](/apis/history/get-history-id)。

## 关于重复帖子的更多信息

更多信息请参见 [Duplicate and Similar Posts](/testing/post-verification#duplicate-and-similar-posts)。
