---
title: "Facebook获取资料帖子 API (V1)"
description: "使用游标分页获取指定Facebook个人资料ID的公开帖子。用于浏览已知个人资料的公开发布历史或继续浏览后续帖子页面。"
aiUsagePrompt: true
---

# Facebook获取资料帖子 API \(V1\)

<ApiTester
  method="GET"
  :path='JSON.parse("\"/api/facebook/get-profile-posts/v1\"")'
  :summary='JSON.parse("\"获取资料帖子 (V1)\"")'
  openapiDefinitionUrl="https://docs.justoneapi.com/openapi/facebook/get-profile-posts-v1-zh.json"
  openapiVersion="3.1.0"
  :parameters='JSON.parse("[{\"name\":\"token\",\"in\":\"query\",\"description\":\"用于API访问鉴权的用户安全令牌。\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"profileId\",\"in\":\"query\",\"description\":\"唯一的Facebook个人资料ID。\",\"required\":true,\"schema\":{\"type\":\"string\"}},{\"name\":\"cursor\",\"in\":\"query\",\"description\":\"用于获取下一组结果的分页游标。\",\"required\":false,\"schema\":{\"type\":\"string\",\"default\":\"\"}}]")'
  :requestBody='JSON.parse("null")'
  :responses='JSON.parse("{\"200\":{\"description\":\"好的\",\"content\":{\"application/json\":{\"schema\":{\"if\":{\"properties\":{\"code\":{\"const\":0}},\"required\":[\"code\"]},\"then\":{\"properties\":{\"data\":{\"type\":\"object\",\"description\":\"Facebook 主页的公开帖子和翻页信息。\",\"properties\":{\"results\":{\"type\":\"array\",\"description\":\"该主页返回的公开帖子，列表可以为空。\",\"items\":{\"type\":\"object\",\"description\":\"一条公开主页帖子。\",\"properties\":{\"post_id\":{\"type\":\"string\",\"description\":\"Facebook 帖子标识。\"},\"type\":{\"type\":\"string\",\"description\":\"记录类型。已核验的结果返回 post。\"},\"url\":{\"type\":\"string\",\"description\":\"Facebook 帖子的公开链接。\"},\"message\":{\"type\":[\"string\",\"null\"],\"description\":\"帖子正文，不可用时为 null。\"},\"message_rich\":{\"type\":[\"string\",\"null\"],\"description\":\"返回的格式化帖子正文，不可用时为 null。\"},\"timestamp\":{\"type\":\"integer\",\"description\":\"帖子发布时间，Unix 时间戳，单位为秒。\"},\"comments_count\":{\"type\":\"integer\",\"description\":\"平台返回的帖子评论数。\"},\"reactions_count\":{\"type\":\"integer\",\"description\":\"帖子返回的回应总数。\"},\"reshare_count\":{\"type\":\"integer\",\"description\":\"帖子返回的转发次数。\"},\"reactions\":{\"type\":\"object\",\"description\":\"各类型的回应计数。\",\"properties\":{\"angry\":{\"type\":\"integer\",\"description\":\"愤怒回应数。\"},\"care\":{\"type\":\"integer\",\"description\":\"关怀回应数。\"},\"haha\":{\"type\":\"integer\",\"description\":\"哈哈回应数。\"},\"like\":{\"type\":\"integer\",\"description\":\"赞回应数。\"},\"love\":{\"type\":\"integer\",\"description\":\"爱心回应数。\"},\"sad\":{\"type\":\"integer\",\"description\":\"悲伤回应数。\"},\"wow\":{\"type\":\"integer\",\"description\":\"惊讶回应数。\"}}},\"author\":{\"type\":\"object\",\"description\":\"帖子的主要公开作者。\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Facebook 主页标识。\"},\"name\":{\"type\":\"string\",\"description\":\"主页的公开显示名称。\"},\"url\":{\"type\":\"string\",\"description\":\"Facebook 主页的公开链接。\"},\"profile_picture_url\":{\"type\":\"string\",\"description\":\"返回的作者头像链接。\"},\"delegate_page_id\":{\"type\":[\"string\",\"null\"],\"description\":\"有数据时返回的代理作者 Facebook 主页标识。\"}}},\"authors\":{\"type\":\"array\",\"description\":\"与帖子关联的公开作者列表。\",\"items\":{\"type\":\"object\",\"description\":\"与帖子关联的一位公开作者。\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Facebook 主页标识。\"},\"name\":{\"type\":\"string\",\"description\":\"主页的公开显示名称。\"},\"url\":{\"type\":\"string\",\"description\":\"Facebook 主页的公开链接。\"},\"profile_picture_url\":{\"type\":\"string\",\"description\":\"返回的作者头像链接。\"},\"delegate_page_id\":{\"type\":[\"string\",\"null\"],\"description\":\"有数据时返回的代理作者 Facebook 主页标识。\"}}}},\"author_title\":{\"description\":\"帖子作者头衔信息。已核验的样本返回 null。\"},\"image\":{\"type\":[\"object\",\"null\"],\"description\":\"单张图片附件详情，不可用时为 null。\",\"properties\":{\"uri\":{\"type\":\"string\",\"description\":\"图片附件链接。\"},\"height\":{\"type\":\"integer\",\"description\":\"图片附件高度，单位为像素。\"},\"width\":{\"type\":\"integer\",\"description\":\"图片附件宽度，单位为像素。\"},\"id\":{\"type\":\"string\",\"description\":\"图片附件标识。\"}}},\"video\":{\"type\":[\"string\",\"null\"],\"description\":\"Facebook 视频附件链接，不可用时为 null。\"},\"video_view_count\":{\"type\":[\"integer\",\"null\"],\"description\":\"返回的视频观看次数，不可用时为 null。\"},\"album_preview\":{\"type\":[\"array\",\"null\"],\"description\":\"帖子相册中的附件预览，不可用时为 null。\",\"items\":{\"type\":\"object\",\"description\":\"一条附件预览，例如照片或视频。\",\"properties\":{\"type\":{\"type\":\"string\",\"description\":\"预览附件类型。已核验的预览包含照片和视频。\"},\"image_file_uri\":{\"type\":\"string\",\"description\":\"预览图片链接。\"},\"url\":{\"type\":\"string\",\"description\":\"预览附件的 Facebook 公开链接。\"},\"id\":{\"type\":\"string\",\"description\":\"预览附件标识。\"},\"video_sd_file\":{\"type\":\"string\",\"description\":\"预览返回的标清视频文件链接。\"},\"video_hd_file\":{\"type\":\"string\",\"description\":\"预览返回的高清视频文件链接。\"},\"video_id\":{\"type\":\"string\",\"description\":\"预览返回的 Facebook 视频标识。\"}}}},\"video_files\":{\"type\":[\"object\",\"null\"],\"description\":\"与帖子关联的视频文件链接，不可用时为 null。\",\"properties\":{\"video_sd_file\":{\"type\":\"string\",\"description\":\"帖子返回的标清视频文件链接。\"},\"video_hd_file\":{\"type\":\"string\",\"description\":\"帖子返回的高清视频文件链接。\"}}},\"video_thumbnail\":{\"type\":[\"string\",\"null\"],\"description\":\"视频缩略图链接，不可用时为 null。\"},\"external_url\":{\"type\":[\"string\",\"null\"],\"description\":\"帖子附带的外部链接，不可用时为 null。\"},\"attached_event\":{\"description\":\"活动附件信息。已核验的样本返回 null。\"},\"attached_group\":{\"description\":\"小组附件信息。已核验的样本返回 null。\"},\"attached_post\":{\"type\":[\"object\",\"null\"],\"description\":\"附带的 Facebook 帖子详情，不可用时为 null。\",\"properties\":{\"post_id\":{\"type\":\"string\",\"description\":\"附带的 Facebook 帖子标识。\"},\"url\":{\"type\":\"string\",\"description\":\"附带的 Facebook 帖子的公开链接。\"},\"timestamp\":{\"description\":\"附带帖子的发布时间戳。已核验的样本返回 null。\"},\"message\":{\"type\":[\"string\",\"null\"],\"description\":\"附带帖子的正文，不可用时为 null。\"},\"photo_url\":{\"description\":\"附带帖子的照片链接。已核验的样本返回 null。\"},\"author\":{\"type\":\"object\",\"description\":\"附带帖子返回的公开作者信息。\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Facebook 主页标识。\"},\"name\":{\"type\":\"string\",\"description\":\"主页的公开显示名称。\"},\"url\":{\"type\":\"string\",\"description\":\"Facebook 主页的公开链接。\"}}},\"video_url\":{\"type\":[\"string\",\"null\"],\"description\":\"附带帖子的视频链接，不可用时为 null。\"},\"album_url\":{\"description\":\"附带帖子的相册链接。已核验的样本返回 null。\"}}},\"attached_post_url\":{\"type\":[\"string\",\"null\"],\"description\":\"附带帖子链接，不可用时为 null。\"},\"text_format_metadata\":{\"description\":\"帖子文字的格式信息。已核验的样本返回 null。\"},\"comments_id\":{\"type\":\"string\",\"description\":\"帖子评论区域所返回的标识。\"},\"shares_id\":{\"type\":\"string\",\"description\":\"帖子分享区域所返回的标识。\"},\"associated_group_id\":{\"description\":\"帖子关联小组的标识信息。已核验的样本返回 null。\"},\"associated_group\":{\"description\":\"帖子关联的 Facebook 小组信息。已核验的样本返回 null。\"},\"images_count\":{\"type\":[\"integer\",\"null\"],\"description\":\"帖子返回的图片数量，不可用时为 null。\"},\"top_comments\":{\"type\":\"array\",\"description\":\"帖子随附的热门评论，列表可以为空。\",\"items\":{\"type\":\"object\",\"description\":\"帖子随附的一条热门评论。\",\"properties\":{\"type\":{\"type\":\"string\",\"description\":\"评论记录类型。已核验的记录返回 top_comment。\"},\"id\":{\"type\":\"string\",\"description\":\"热门评论标识。\"},\"legacy_fb_id\":{\"type\":\"string\",\"description\":\"评论的 Facebook 旧版标识。\"},\"text\":{\"type\":\"string\",\"description\":\"热门评论正文。\"},\"author\":{\"type\":\"object\",\"description\":\"评论返回的公开作者信息。\",\"properties\":{\"id\":{\"type\":\"string\",\"description\":\"Facebook 主页标识。\"},\"name\":{\"type\":\"string\",\"description\":\"主页的公开显示名称。\"},\"url\":{\"type\":\"string\",\"description\":\"Facebook 主页的公开链接。\"},\"gender\":{\"type\":\"string\",\"description\":\"返回的评论作者性别标签。\"},\"profile_image_url\":{\"type\":\"string\",\"description\":\"返回的评论作者头像链接。\"}}},\"created_time\":{\"type\":\"integer\",\"description\":\"评论发布时间，Unix 时间戳（秒）。\"}}}},\"was_detected_as_ai_generated\":{\"description\":\"平台检测到 AI 生成内容时的标记信息。已核验的样本返回 null。\"},\"was_self_disclosed_as_ai_generated\":{\"description\":\"作者声明内容由 AI 生成时的标记信息。已核验的样本返回 null。\"}}}},\"cursor\":{\"type\":[\"string\",\"null\"],\"description\":\"继续查看同一主页时，将返回的游标原样传入 cursor 查询参数。null 表示本次未返回续页游标。\"}}}}},\"allOf\":[{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}]}}}},\"400\":{\"description\":\"请求参数或请求体无效\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"401\":{\"description\":\"访问令牌无效或未激活\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"403\":{\"description\":\"权限不足\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"429\":{\"description\":\"请求速率或每日配额已超限\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"500\":{\"description\":\"服务器内部错误\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}},\"503\":{\"description\":\"服务暂时不可用\",\"content\":{\"application/json\":{\"schema\":{\"type\":\"object\",\"properties\":{\"code\":{\"type\":\"integer\",\"format\":\"int32\",\"enum\":[0,100,101,202,300,301,302,303,400,404,500,503,600,601,602]},\"message\":{\"type\":[\"string\",\"null\"]},\"data\":{},\"recordTime\":{\"type\":[\"string\",\"null\"]},\"requestId\":{\"type\":\"string\"},\"reason\":{\"type\":\"string\"},\"requestParams\":{\"type\":\"object\",\"properties\":{\"query\":{\"type\":\"object\",\"additionalProperties\":{\"type\":\"object\"}},\"body\":{\"type\":\"object\",\"properties\":{\"empty\":{\"type\":\"boolean\"},\"array\":{\"type\":\"boolean\"},\"null\":{\"type\":\"boolean\"},\"object\":{\"type\":\"boolean\"},\"float\":{\"type\":\"boolean\"},\"container\":{\"type\":\"boolean\"},\"valueNode\":{\"type\":\"boolean\"},\"integralNumber\":{\"type\":\"boolean\"},\"floatingPointNumber\":{\"type\":\"boolean\"},\"missingNode\":{\"type\":\"boolean\"},\"boolean\":{\"type\":\"boolean\"},\"binary\":{\"type\":\"boolean\"},\"nodeType\":{\"type\":\"string\",\"enum\":[\"ARRAY\",\"BINARY\",\"BOOLEAN\",\"MISSING\",\"NULL\",\"NUMBER\",\"OBJECT\",\"POJO\",\"STRING\"]},\"string\":{\"type\":\"boolean\"},\"pojo\":{\"type\":\"boolean\"},\"short\":{\"type\":\"boolean\"},\"int\":{\"type\":\"boolean\"},\"long\":{\"type\":\"boolean\"},\"double\":{\"type\":\"boolean\"},\"bigDecimal\":{\"type\":\"boolean\"},\"bigInteger\":{\"type\":\"boolean\"},\"textual\":{\"type\":\"boolean\",\"deprecated\":true},\"number\":{\"type\":\"boolean\"},\"embeddedValue\":{\"type\":\"boolean\"}}}}}},\"required\":[\"code\",\"data\",\"message\",\"recordTime\"]}}}}}")'
  :servers='JSON.parse("[{\"url\":\"https://api.justoneapi.com\",\"description\":\"全球生产 API（默认）\"}]")'
  :security='JSON.parse("[]")'
  :securitySchemes='JSON.parse("{}")'
  :schemas='JSON.parse("{}")'
/>

<ApiHealthSection :api='JSON.parse("\"/api/facebook/get-profile-posts/v1\"")' />

<p>使用游标分页获取指定Facebook个人资料ID的公开帖子。用于浏览已知个人资料的公开发布历史或继续浏览后续帖子页面。</p>

## 请求参数

<div class="api-doc-table api-doc-table--params">

| 参数名 | 位置 | 类型 | 必填 | 默认值 | 说明 |
| --- | --- | --- | --- | --- | --- |
| <code>token</code> | query | <code>string</code> | 是 | - | 用于API访问鉴权的用户安全令牌。 |
| <code>profileId</code> | query | <code>string</code> | 是 | - | 唯一的Facebook个人资料ID。 |
| <code>cursor</code> | query | <code>string</code> | 否 | <code></code> | 用于获取下一组结果的分页游标。 |

</div>

## 代码示例

::: code-group

```bash [🐚 cURL]
curl --max-time 120 -X GET 'https://api.justoneapi.com/api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE'
```

```text [🤖 AI 提示词]
我想使用 JustOneAPI 提供的“获取资料帖子 (V1)”接口。
接入地址: https://api.justoneapi.com。
接口路径: /api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE
接口地址: BASE_URL + /api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE
HTTP 方法: GET
身份验证: 在 URL 中传入 token 查询参数。
OpenAPI 定义: https://docs.justoneapi.com/openapi/facebook/get-profile-posts-v1-zh.json

请求参数说明:
- token (query): 用于API访问鉴权的用户安全令牌。 (必填)
- profileId (query): 唯一的Facebook个人资料ID。 (必填)
- cursor (query): 用于获取下一组结果的分页游标。

返回格式: 请根据实际 Content-Type 安全处理 JSON 或文本响应。

响应处理与错误码：
1. 需通过返回体中的 "code" 字段判断业务结果（code 为 0 表示成功）。
2. 超时建议：建议将请求超时时间设置为 120 秒；如果 120 秒偏长，请至少设置为 60 秒，但可能会有少量请求因超时而未接收到结果。
3. 业务码说明：
   - 0: 成功
   - 100: Token 无效或已失效
   - 301: 采集失败，请重试
   - 302: 超出速率限制
   - 303: 超出每日配额
   - 400: 参数错误
   - 500: 内部服务器错误
   - 600: 权限不足
   - 601: 账户余额不足
   - 602: TOKEN 限额超限
4. code 601 表示账户共享余额不足。code 602 表示当前 API TOKEN 自身的累计消费上限已达到。TOKEN 限额不是资金划拨，多个 TOKEN 仍共享同一个账户余额。

请帮我用我擅长的编程语言写一个脚本来调用这个接口，并处理返回结果。
```

```python [🐍 Python]
import requests

BASE_URL = "https://api.justoneapi.com"  # 由 OpenAPI servers 提供

url = BASE_URL + "/api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE"
response = requests.get(url, timeout=120)
print(response.status_code)
if response.content:
    content_type = response.headers.get("content-type", "").lower()
    if "json" in content_type:
        try:
            print(response.json())
        except ValueError:
            print(response.text)
    elif content_type.startswith("text/") or "xml" in content_type or content_type.split(";", 1)[0].strip() in {"application/javascript", "application/x-www-form-urlencoded", "application/graphql"}:
        print(response.text)
    else:
        with open("response.bin", "wb") as output:
            output.write(response.content)
        print(f"Saved {len(response.content)} bytes to response.bin")
```

```js [🌐 JavaScript]
const BASE_URL = "https://api.justoneapi.com"; // 由 OpenAPI servers 提供
const url = BASE_URL + "/api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE";

const response = await fetch(url, {
  method: "GET",
  signal: AbortSignal.timeout(120000)
});
console.log(response.status);
const responseBytes = await response.arrayBuffer();
if (responseBytes.byteLength) {
  const contentType = (response.headers.get("content-type") || "").toLowerCase();
  const mediaType = contentType.split(";", 1)[0].trim();
  const textual = contentType.startsWith("text/") || contentType.includes("json") || contentType.includes("xml") || ["application/javascript", "application/x-www-form-urlencoded", "application/graphql"].includes(mediaType);
  if (textual) {
    const responseText = new TextDecoder().decode(responseBytes);
    let data = responseText;
    if (contentType.includes("json")) {
      try { data = JSON.parse(responseText); } catch { /* Keep the raw body. */ }
    }
    console.log(data);
  } else {
    console.log(`Received ${responseBytes.byteLength} binary bytes`);
  }
}
```

```java [☕ Java]
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.time.Duration;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;

public class Main {
    public static void main(String[] args) throws Exception {
        final String BASE_URL = "https://api.justoneapi.com"; // 由 OpenAPI servers 提供
        final String url = BASE_URL + "/api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE";

        HttpClient client = HttpClient.newBuilder().connectTimeout(Duration.ofSeconds(120)).build();
        HttpRequest.Builder builder = HttpRequest.newBuilder()
            .uri(URI.create(url))
            .timeout(Duration.ofSeconds(120))
            .method("GET", HttpRequest.BodyPublishers.noBody());

        HttpRequest request = builder.build();

        HttpResponse<byte[]> response = client.send(request, HttpResponse.BodyHandlers.ofByteArray());
        System.out.println(response.statusCode());
        String contentType = response.headers().firstValue("content-type").orElse("").toLowerCase();
        String mediaType = contentType.split(";", 2)[0].trim();
        if (contentType.startsWith("text/") || contentType.contains("json") || contentType.contains("xml") || mediaType.equals("application/javascript") || mediaType.equals("application/x-www-form-urlencoded") || mediaType.equals("application/graphql")) {
            System.out.println(new String(response.body(), StandardCharsets.UTF_8));
        } else {
            Files.write(Path.of("response.bin"), response.body());
            System.out.println("Saved " + response.body().length + " bytes to response.bin");
        }
    }
}
```

```go [🐹 Go]
package main

import (
	"fmt"
	"io"
	"os"
	"strings"
	"net/http"
	"time"
)

const BASE_URL = "https://api.justoneapi.com" // 由 OpenAPI servers 提供

func main() {
	client := &http.Client{Timeout: 120 * time.Second}
	url := BASE_URL + "/api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE"
	req, _ := http.NewRequest("GET", url, nil)
	resp, _ := client.Do(req)
	defer resp.Body.Close()
	fmt.Println(resp.StatusCode)
	bodyBytes, _ := io.ReadAll(resp.Body)
	contentType := strings.ToLower(resp.Header.Get("Content-Type"))
	mediaType := strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0])
	if strings.HasPrefix(contentType, "text/") || strings.Contains(contentType, "json") || strings.Contains(contentType, "xml") || mediaType == "application/javascript" || mediaType == "application/x-www-form-urlencoded" || mediaType == "application/graphql" {
		fmt.Println(string(bodyBytes))
	} else {
		os.WriteFile("response.bin", bodyBytes, 0600)
		fmt.Printf("Saved %d bytes to response.bin\n", len(bodyBytes))
	}
}
```

```php [🐘 PHP]
<?php
$BASE_URL = 'https://api.justoneapi.com'; // 由 OpenAPI servers 提供
$url = $BASE_URL . '/api/facebook/get-profile-posts/v1?token=YOUR_API_KEY&profileId=VALUE';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
$contentType = strtolower((string) curl_getinfo($ch, CURLINFO_CONTENT_TYPE));
curl_close($ch);
echo $status . PHP_EOL;
$mediaType = trim(explode(';', $contentType, 2)[0]);
if (str_starts_with($contentType, 'text/') || str_contains($contentType, 'json') || str_contains($contentType, 'xml') || in_array($mediaType, ['application/javascript', 'application/x-www-form-urlencoded', 'application/graphql'], true)) {
    echo $response;
} else {
    file_put_contents('response.bin', $response);
    echo 'Saved ' . strlen($response) . ' bytes to response.bin' . PHP_EOL;
}
```

:::

<div style="text-align: right; margin-top: -20px; margin-bottom: 20px;">
<a href="/openapi/facebook/get-profile-posts-v1-zh.json" target="_blank" style="font-size: 12px; color: var(--vp-c-text-3); text-decoration: none; opacity: 0.8;">[OpenAPI 定义 (JSON)]</a>
</div>

## 返回字段

业务成功时（`code = 0`）的主要返回字段。

<div class="api-doc-table api-doc-table--response">

| 字段路径 | 类型 | 说明 |
| --- | --- | --- |
| <code>data</code> | <code>object</code> | Facebook 主页的公开帖子和翻页信息。 |
| <code>data.results</code> | <code>array</code> | 该主页返回的公开帖子，列表可以为空。 |
| <code>data.results[]</code> | <code>object</code> | 一条公开主页帖子。 |
| <code>data.results[].post_id</code> | <code>string</code> | Facebook 帖子标识。 |
| <code>data.results[].type</code> | <code>string</code> | 记录类型。已核验的结果返回 post。 |
| <code>data.results[].url</code> | <code>string</code> | Facebook 帖子的公开链接。 |
| <code>data.results[].message</code> | <code>string &#124; null</code> | 帖子正文，不可用时为 null。 |
| <code>data.results[].message_rich</code> | <code>string &#124; null</code> | 返回的格式化帖子正文，不可用时为 null。 |
| <code>data.results[].timestamp</code> | <code>integer</code> | 帖子发布时间，Unix 时间戳，单位为秒。 |
| <code>data.results[].comments_count</code> | <code>integer</code> | 平台返回的帖子评论数。 |
| <code>data.results[].reactions_count</code> | <code>integer</code> | 帖子返回的回应总数。 |
| <code>data.results[].reshare_count</code> | <code>integer</code> | 帖子返回的转发次数。 |
| <code>data.results[].reactions</code> | <code>object</code> | 各类型的回应计数。 |
| <code>data.results[].reactions.angry</code> | <code>integer</code> | 愤怒回应数。 |
| <code>data.results[].reactions.care</code> | <code>integer</code> | 关怀回应数。 |
| <code>data.results[].reactions.haha</code> | <code>integer</code> | 哈哈回应数。 |
| <code>data.results[].reactions.like</code> | <code>integer</code> | 赞回应数。 |
| <code>data.results[].reactions.love</code> | <code>integer</code> | 爱心回应数。 |
| <code>data.results[].reactions.sad</code> | <code>integer</code> | 悲伤回应数。 |
| <code>data.results[].reactions.wow</code> | <code>integer</code> | 惊讶回应数。 |
| <code>data.results[].author</code> | <code>object</code> | 帖子的主要公开作者。 |
| <code>data.results[].author.id</code> | <code>string</code> | Facebook 主页标识。 |
| <code>data.results[].author.name</code> | <code>string</code> | 主页的公开显示名称。 |
| <code>data.results[].author.url</code> | <code>string</code> | Facebook 主页的公开链接。 |
| <code>data.results[].author.profile_picture_url</code> | <code>string</code> | 返回的作者头像链接。 |
| <code>data.results[].author.delegate_page_id</code> | <code>string &#124; null</code> | 有数据时返回的代理作者 Facebook 主页标识。 |
| <code>data.results[].authors</code> | <code>array</code> | 与帖子关联的公开作者列表。 |
| <code>data.results[].authors[]</code> | <code>object</code> | 与帖子关联的一位公开作者。 |
| <code>data.results[].authors[].id</code> | <code>string</code> | Facebook 主页标识。 |
| <code>data.results[].authors[].name</code> | <code>string</code> | 主页的公开显示名称。 |
| <code>data.results[].authors[].url</code> | <code>string</code> | Facebook 主页的公开链接。 |
| <code>data.results[].authors[].profile_picture_url</code> | <code>string</code> | 返回的作者头像链接。 |
| <code>data.results[].authors[].delegate_page_id</code> | <code>string &#124; null</code> | 有数据时返回的代理作者 Facebook 主页标识。 |
| <code>data.results[].author_title</code> | - | 帖子作者头衔信息。已核验的样本返回 null。 |
| <code>data.results[].image</code> | <code>object &#124; null</code> | 单张图片附件详情，不可用时为 null。 |
| <code>data.results[].image.uri</code> | <code>string</code> | 图片附件链接。 |
| <code>data.results[].image.height</code> | <code>integer</code> | 图片附件高度，单位为像素。 |
| <code>data.results[].image.width</code> | <code>integer</code> | 图片附件宽度，单位为像素。 |
| <code>data.results[].image.id</code> | <code>string</code> | 图片附件标识。 |
| <code>data.results[].video</code> | <code>string &#124; null</code> | Facebook 视频附件链接，不可用时为 null。 |
| <code>data.results[].video_view_count</code> | <code>integer &#124; null</code> | 返回的视频观看次数，不可用时为 null。 |
| <code>data.results[].album_preview</code> | <code>array &#124; null</code> | 帖子相册中的附件预览，不可用时为 null。 |
| <code>data.results[].album_preview[]</code> | <code>object</code> | 一条附件预览，例如照片或视频。 |
| <code>data.results[].album_preview[].type</code> | <code>string</code> | 预览附件类型。已核验的预览包含照片和视频。 |
| <code>data.results[].album_preview[].image_file_uri</code> | <code>string</code> | 预览图片链接。 |
| <code>data.results[].album_preview[].url</code> | <code>string</code> | 预览附件的 Facebook 公开链接。 |
| <code>data.results[].album_preview[].id</code> | <code>string</code> | 预览附件标识。 |
| <code>data.results[].album_preview[].video_sd_file</code> | <code>string</code> | 预览返回的标清视频文件链接。 |
| <code>data.results[].album_preview[].video_hd_file</code> | <code>string</code> | 预览返回的高清视频文件链接。 |
| <code>data.results[].album_preview[].video_id</code> | <code>string</code> | 预览返回的 Facebook 视频标识。 |
| <code>data.results[].video_files</code> | <code>object &#124; null</code> | 与帖子关联的视频文件链接，不可用时为 null。 |
| <code>data.results[].video_files.video_sd_file</code> | <code>string</code> | 帖子返回的标清视频文件链接。 |
| <code>data.results[].video_files.video_hd_file</code> | <code>string</code> | 帖子返回的高清视频文件链接。 |
| <code>data.results[].video_thumbnail</code> | <code>string &#124; null</code> | 视频缩略图链接，不可用时为 null。 |
| <code>data.results[].external_url</code> | <code>string &#124; null</code> | 帖子附带的外部链接，不可用时为 null。 |
| <code>data.results[].attached_event</code> | - | 活动附件信息。已核验的样本返回 null。 |
| <code>data.results[].attached_group</code> | - | 小组附件信息。已核验的样本返回 null。 |
| <code>data.results[].attached_post</code> | <code>object &#124; null</code> | 附带的 Facebook 帖子详情，不可用时为 null。 |
| <code>data.results[].attached_post.post_id</code> | <code>string</code> | 附带的 Facebook 帖子标识。 |
| <code>data.results[].attached_post.url</code> | <code>string</code> | 附带的 Facebook 帖子的公开链接。 |
| <code>data.results[].attached_post.timestamp</code> | - | 附带帖子的发布时间戳。已核验的样本返回 null。 |
| <code>data.results[].attached_post.message</code> | <code>string &#124; null</code> | 附带帖子的正文，不可用时为 null。 |
| <code>data.results[].attached_post.photo_url</code> | - | 附带帖子的照片链接。已核验的样本返回 null。 |
| <code>data.results[].attached_post.author</code> | <code>object</code> | 附带帖子返回的公开作者信息。 |
| <code>data.results[].attached_post.author.id</code> | <code>string</code> | Facebook 主页标识。 |
| <code>data.results[].attached_post.author.name</code> | <code>string</code> | 主页的公开显示名称。 |
| <code>data.results[].attached_post.author.url</code> | <code>string</code> | Facebook 主页的公开链接。 |
| <code>data.results[].attached_post.video_url</code> | <code>string &#124; null</code> | 附带帖子的视频链接，不可用时为 null。 |
| <code>data.results[].attached_post.album_url</code> | - | 附带帖子的相册链接。已核验的样本返回 null。 |
| <code>data.results[].attached_post_url</code> | <code>string &#124; null</code> | 附带帖子链接，不可用时为 null。 |
| <code>data.results[].text_format_metadata</code> | - | 帖子文字的格式信息。已核验的样本返回 null。 |
| <code>data.results[].comments_id</code> | <code>string</code> | 帖子评论区域所返回的标识。 |
| <code>data.results[].shares_id</code> | <code>string</code> | 帖子分享区域所返回的标识。 |
| <code>data.results[].associated_group_id</code> | - | 帖子关联小组的标识信息。已核验的样本返回 null。 |
| <code>data.results[].associated_group</code> | - | 帖子关联的 Facebook 小组信息。已核验的样本返回 null。 |
| <code>data.results[].images_count</code> | <code>integer &#124; null</code> | 帖子返回的图片数量，不可用时为 null。 |
| <code>data.results[].top_comments</code> | <code>array</code> | 帖子随附的热门评论，列表可以为空。 |
| <code>data.results[].top_comments[]</code> | <code>object</code> | 帖子随附的一条热门评论。 |
| <code>data.results[].top_comments[].type</code> | <code>string</code> | 评论记录类型。已核验的记录返回 top_comment。 |
| <code>data.results[].top_comments[].id</code> | <code>string</code> | 热门评论标识。 |
| <code>data.results[].top_comments[].legacy_fb_id</code> | <code>string</code> | 评论的 Facebook 旧版标识。 |
| <code>data.results[].top_comments[].text</code> | <code>string</code> | 热门评论正文。 |
| <code>data.results[].top_comments[].author</code> | <code>object</code> | 评论返回的公开作者信息。 |
| <code>data.results[].top_comments[].author.id</code> | <code>string</code> | Facebook 主页标识。 |
| <code>data.results[].top_comments[].author.name</code> | <code>string</code> | 主页的公开显示名称。 |
| <code>data.results[].top_comments[].author.url</code> | <code>string</code> | Facebook 主页的公开链接。 |
| <code>data.results[].top_comments[].author.gender</code> | <code>string</code> | 返回的评论作者性别标签。 |
| <code>data.results[].top_comments[].author.profile_image_url</code> | <code>string</code> | 返回的评论作者头像链接。 |
| <code>data.results[].top_comments[].created_time</code> | <code>integer</code> | 评论发布时间，Unix 时间戳（秒）。 |
| <code>data.results[].was_detected_as_ai_generated</code> | - | 平台检测到 AI 生成内容时的标记信息。已核验的样本返回 null。 |
| <code>data.results[].was_self_disclosed_as_ai_generated</code> | - | 作者声明内容由 AI 生成时的标记信息。已核验的样本返回 null。 |
| <code>data.cursor</code> | <code>string &#124; null</code> | 继续查看同一主页时，将返回的游标原样传入 cursor 查询参数。null 表示本次未返回续页游标。 |

</div>

## 响应示例

<ApiExampleSection :api='JSON.parse("\"/api/facebook/get-profile-posts/v1\"")' />

