mcpbeat Sign in

Facebook Page Posts Skill for Cursor

Scrapes posts from any public Facebook Page timeline, returning structured data including post text, author info, engagement metrics (likes/comments/shares), reaction breakdowns (like/love/haha/wow/sad/angry/care), hashtags and external links, and media type. Use when user wants to scrape Facebook posts, extract Facebook page content, get Facebook post data, collect Facebook engagement stats, download Facebook posts, monitor a Facebook page, crawl Facebook timeline, get Facebook reactions, get like count/comment count/share count from Facebook, Facebook post bulk export, Facebook social media analytics. Supports date range filtering (afterTime/beforeTime) and cursor-based pagination for bulk collection.

5k tokens
context cost
the whole folder, loaded on every use
3
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
5133
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/browser-act/skills --skill facebook-page-posts

What comes with it

9 347 bytes besides the instruction
scripts/get-page-id.py
scripts/get-page-posts.py

What it tells the agent to use

found in the instruction text
Bash runs shell commands — read the instruction before connecting

The instruction itself

15 sections, as written by the author

Facebook — Page Posts Scraper

> Facebook page URL → list of posts with full engagement metrics and text references

Language

All process output to user (progress updates, process notifications) must be in English.

Objective

Extract posts from a public Facebook Page timeline, including post content, engagement counts, reaction breakdowns, and text references (hashtags/links).

Prerequisites

  • The target Facebook page is open in the browser (e.g., https://www.facebook.com/cern)
  • User is logged into Facebook (user avatar visible in the top right)

Pre-execution Checks

1. Tool Readiness

If browser-act has been confirmed available in the current session → skip this step.

Invoke browser-act via Skill tool to load usage. If installation or configuration issues arise, follow its guidance to resolve then retry.

2. Login Verification

If login status for Facebook has been confirmed in the current session → skip this step.

Otherwise: navigate to https://www.facebook.com and check:

  • User avatar or name visible in top right → logged in, continue
  • Login button visible → not logged in, inform the user and assist with login

User refuses or cannot log in → terminate execution.

Capability Components

> This Skill's operational boundary = what the user can manually do in their browser. It only reads data already displayed to the user on the page, never bypassing authentication or access controls. JS code is encapsulated in Python files under the scripts/ directory, invoked via eval "$(python scripts/xxx.py {params})". $(...) is bash syntax; it is recommended to use the bash tool for execution.

API: Resolve Facebook page URL to numeric page ID

eval "$(python scripts/get-page-id.py '{page_url}')"

Parameters:

  • page_url: Full Facebook page URL, e.g. https://www.facebook.com/cern

Must run while the target page is open (or any Facebook page is open) so the browser has Facebook cookies.

Output example:

{
  "pageId": "100064792144187",   // Numeric page ID used in all subsequent API calls
  "pageUrl": "https://www.facebook.com/cern"
}

API: Fetch posts from page timeline

eval "$(python scripts/get-page-posts.py '{page_id}' --cursor '{cursor}' --after-time {after_time} --before-time {before_time} --count {count})"

Parameters:

  • page_id: Numeric Facebook page ID (from get-page-id above)
  • --cursor: Pagination cursor string from previous response pagination.endCursor; omit or pass null for first page
  • --after-time: Unix timestamp (seconds); only return posts after this time; omit or pass null for no filter
  • --before-time: Unix timestamp (seconds); only return posts before this time; omit or pass null for no filter
  • --count: Number of posts per batch, default 5, max recommended 10

Output example:

{
  "posts": [
    {
      "postId": "1417704873732571",                        // Numeric post ID
      "url": "https://www.facebook.com/cern/posts/pfbid…", // Post permalink
      "text": "CERN Council updates European Strategy…",   // Full post text
      "textReferences": [
        {
          "type": "ExternalUrl",                           // "ExternalUrl" or "Hashtag"
          "url": "https://home.cern/...",                  // Clean URL (not l.facebook.com redirect)
          "offset": 731,                                   // Position in text
          "length": 96
        },
        {
          "type": "Hashtag",
          "url": "https://www.facebook.com/hashtag/espp",
          "offset": 296,
          "length": 5
        }
      ],
      "creationTime": 1779460218,                          // Unix timestamp (seconds)
      "user": {
        "id": "100064792144187",                           // Page numeric ID
        "name": "CERN",                                    // Page display name
        "profileUrl": "https://www.facebook.com/cern"     // Page URL
      },
      "likes": 1220,                                       // Total reactions count
      "comments": 44,                                      // Comment count
      "shares": 122,                                       // Share count
      "topReactions": [
        { "name": "Like",  "count": 1108 },
        { "name": "Love",  "count": 92 },
        { "name": "Care",  "count": 9 },
        { "name": "Wow",   "count": 8 },
        { "name": "Haha",  "count": 1 },
        { "name": "Sad",   "count": 1 },
        { "name": "Angry", "count": 1 }
      ],
      "topReactionsCount": 1220,                           // Same as likes, total reactions
      "media": {
        "type": "Photo",                                   // "Photo", "Video", or null for text-only
        "id": "photo_id_string",                           // Media asset ID
        "viewsCount": null                                 // Video view count; null for photos
      },
      "feedbackId": "ZmVlZGJhY2s6MTQxNzcw…"               // Base64 feedback ID
    }
  ],
  "pagination": {
    "endCursor": "Cg8Ob3JnYW5pY19jd…",                   // Pass to --cursor for next page
    "hasNextPage": true                                    // false when no more posts
  }
}

Error handling: If response contains "error": true, check that the target page is open and the user is logged in, then retry once. If the error persists, the doc_id may have expired — check experience notes for updates.

Pagination

API Pagination: cursor-based. Pass pagination.endCursor from each response as --cursor in the next call. Start value: omit --cursor (first page). Termination: pagination.hasNextPage === false.

Success Criteria

posts.length >= 1 AND posts[0].postId is non-null AND posts[0].likes is non-null

Known Limitations

  • media.id is returned but media thumbnail/photo URLs are not included in the API response for this query; only type and ID are available
  • viewsCount is only populated for Video-type attachments; null for photos
  • feedbackId is present but detailed reaction dialog data (individual reactor profiles) requires a separate API call not covered by this Skill
  • The doc_id: 27278869228466784 is a Facebook internal query ID that may change when Facebook deploys updates; if all calls return errors, the doc_id may need to be recaptured via HAR recording on the page
  • Requires an active Facebook login session; public/unauthenticated access is not supported
  • Date filtering (afterTime/beforeTime) applies to the timeline cursor position, not a strict server-side filter; posts near the boundary may occasionally appear outside the specified range

Execution Efficiency

  • Batch orchestration: Write a bash script to loop through the command templates serially within a single session; do not parallelize within one browser (prone to triggering anti-scraping restrictions). Add a 1–2 second delay between paginated calls to avoid rate limiting. To increase throughput, open multiple browser sessions and distribute work across them — each session has an independent fingerprint so rate limits apply per session
  • Test before batch execution: After writing a batch script, you must first test with 1-2 items to verify the script runs correctly; only then run the full batch. Never skip testing and execute in batch directly
  • Reduce redundant pre-operations: Run get-page-id once per page URL and reuse the result for all paginated calls
  • Error resumption: Save results page by page during batch processing; on failure, resume from the last successful endCursor rather than starting over

Experience Notes

Path: {working-directory}/browser-act-skill-forge-memories/facebook-posts-scraper-facebook-page-posts.memory.md

Before execution: If the file exists, read it first — it records unexpected situations encountered during past executions (e.g., a strategy has become ineffective); adjust strategy order accordingly.

After execution: If an unexpected situation is encountered (strategy became ineffective, page redesigned, anti-scraping upgraded, better path discovered), append a line:

{YYYY-MM-DD}: {what happened} → {conclusion}

Normal execution does not write to the file. Do not record what keywords were used or how many results were returned — those are task outputs, not experience.

Other skills for the same job

different authors, same section of the catalogue
Daily News Report
by christophacham
×2

Scrapes content based on a preset URL list, filters high-quality technical information, and generates daily Markdown reports.

5k tokens
Daily News Report
by ComeOnOliver
×1

Scrapes content based on a preset URL list, filters high-quality technical information, and generates daily Markdown reports.

8k tokens
Lead Qualification
by gooseworks-ai

> Lead qualification engine with conversational intake. Asks structured questions to understand your qualification criteria, generates a reusable qualification prompt, then batch-enriches leads via Apify LinkedIn scraping and scores them with parallel processing. Outputs qualified/disqualified verdicts with confidence scores and reasoning to CSV or whatever output format the user prefers. Supports calibration mode for prompt refinement.

12k tokens scripts
Google Maps Reviews Scraper
by gmapsscraper

Analyze Google Maps review data from CSV exports. Sentiment analysis, trend detection, competitor review comparison, and reputation insights — no API key needed.

1k tokens
Lovstudio Wxmp Cracker
by lovstudio

微信公众号文章抓取与导出。自动处理 mp.weixin.qq.com 的登录态获取与续期, 支持按公众号搜索、抓取文章列表与正文、按日期窗口导出 Markdown / JSON / CSV。 Trigger when the user wants to crawl a WeChat public account, export recent articles, or 提到 "wcx"、"微信公众号"、"公众号文章"、"mp.weixin"、"抓公众号"、 "crawl wechat official account"、"wxmp"、"最近十天的文章"。

7k tokens scripts
Nimble Databricks Data Products
by Nimbleway

| web-data agents, scrapes into Delta tables, and produces an AI/BI dashboard and/or a deployed Databricks App — a table → dashboard → app workflow, for production data products or quick demos. Use whenever a request pairs live or scraped web data WITH a Databricks destination — e.g. "scrape Amazon/Walmart prices into a Delta table and build a dashboard", "load Zillow/Instagram/Maps/search results into Databricks and build a dashboard or app", "showcase Nimble + Databricks to a prospect". Prefer it over nimble-web-expert or competitor-intel when the data lands in Databricks. Do NOT use for one-off web fetches or CSV exports with no Databricks destination — use nimble-web-expert instead. Do NOT use for competitor or company research briefings — use competitor-intel or company-deep-dive instead. Do NOT use for generic Databricks work with no Nimble/web-data angle — use the official databricks-* skills instead.

21k tokens scripts
XLSX
by anthropics
vendor ×15

Comprehensive spreadsheet creation, editing, and analysis with support for formulas, formatting, data analysis, and visualization. When Claude needs to work with spreadsheets (.xlsx, .xlsm, .csv, .tsv, etc) for: (1) Creating new spreadsheets with formulas and formatting, (2) Reading or analyzing data, (3) Modify existing spreadsheets while preserving formulas, (4) Data analysis and visualization in spreadsheets, or (5) Recalculating formulas

5k tokens scripts
XLSX
by w95
×7

Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like \"the xlsx in my downloads\") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.

3k tokens

How to use it

Copy the folder

Take browser-act/facebook-page-posts from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.