.claude/skills/ts-facebook-marketing/SKILL.md
Create, optimize, and automate Facebook content for Pages, Groups, and Ads. Use when someone asks to "grow Facebook page", "create Facebook ads", "manage Facebook group", "Facebook API integration", "automate Facebook posting", "Facebook analytics", or "Facebook marketing strategy". Covers Pages, Groups, Graph API publishing, Ads Manager API, Messenger bots, and growth strategies.
npx skillsauth add eliferjunior/Claude facebook-marketingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill helps AI agents create content for Facebook Pages, manage Groups, run Ads, and integrate with the Facebook Graph API. It covers content formats, Page management, Group engagement, Ads Manager API, Messenger automation, analytics, and growth strategies for Facebook's mature, community-driven ecosystem.
Facebook algorithm (2025-2026):
What kills reach:
?utm_source=facebook&utm_medium=social&utm_campaign=nameGroup setup:
- Name: [Topic] + Community/Network/Hub (searchable keywords)
- Description: Clear value proposition, who it's for, rules summary
- Privacy: Private (more exclusive feel, better engagement)
- Rules: 5-7 clear rules, pin to top
- Welcome post: Auto-post for new members with introduction prompt
- Tags: Relevant topic tags for discoverability
Engagement framework:
- Monday: Weekly theme post / prompt
- Tuesday: Resource sharing day
- Wednesday: Question of the week (poll)
- Thursday: Win/milestone sharing
- Friday: Free discussion / off-topic
- Weekly: Go Live for Q&A or teaching
Use membership questions (3 max) to filter spammers, enable post approval for new members' first 2 weeks, set keyword alerts for spam, and use Admin Assist to auto-decline posts with certain URLs.
// Facebook uses same OAuth as Instagram (shared Meta platform)
const FB_AUTH_URL = 'https://www.facebook.com/v19.0/dialog/oauth';
// Step 1: Redirect user
const authUrl = new URL(FB_AUTH_URL);
authUrl.searchParams.set('client_id', process.env.FB_APP_ID);
authUrl.searchParams.set('redirect_uri', process.env.REDIRECT_URI);
authUrl.searchParams.set('scope', 'pages_manage_posts,pages_read_engagement,pages_show_list,pages_manage_metadata,read_insights');
// Step 2: Exchange code for token
const tokenRes = await fetch(`https://graph.facebook.com/v19.0/oauth/access_token?client_id=${FB_APP_ID}&client_secret=${FB_APP_SECRET}&redirect_uri=${REDIRECT_URI}&code=${code}`);
const { access_token } = await tokenRes.json();
// Step 3: Get Page access token (long-lived)
const pagesRes = await fetch(`https://graph.facebook.com/v19.0/me/accounts?access_token=${access_token}`);
const { data: pages } = await pagesRes.json();
const pageToken = pages[0].access_token; // Already long-lived when from long-lived user token
const pageId = pages[0].id;
// Text post
const postRes = await fetch(`https://graph.facebook.com/v19.0/${pageId}/feed`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
message: 'Your post text here...',
access_token: pageToken,
}),
});
// Post with image
const photoRes = await fetch(`https://graph.facebook.com/v19.0/${pageId}/photos`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
url: 'https://example.com/image.jpg', // Public URL
caption: 'Photo caption...',
access_token: pageToken,
}),
});
// Schedule a post (Unix timestamp, minimum 10 min from now)
await fetch(`https://graph.facebook.com/v19.0/${pageId}/feed`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
message: 'Scheduled post content...',
published: false,
scheduled_publish_time: Math.floor(Date.now() / 1000) + 86400,
access_token: pageToken,
}),
});
// Page insights
const insightsRes = await fetch(
`https://graph.facebook.com/v19.0/${pageId}/insights?metric=page_impressions,page_engaged_users,page_fans,page_views_total&period=day&since=${startDate}&until=${endDate}&access_token=${pageToken}`
);
// Post insights
const postInsightsRes = await fetch(
`https://graph.facebook.com/v19.0/${postId}/insights?metric=post_impressions,post_engaged_users,post_clicks,post_reactions_by_type_total&access_token=${pageToken}`
);
Account
└── Campaign (objective: awareness, traffic, engagement, leads, sales)
└── Ad Set (targeting, budget, schedule, placements)
└── Ad (creative: image/video, copy, CTA)
// Create campaign
const campaignRes = await fetch(`https://graph.facebook.com/v19.0/act_${adAccountId}/campaigns`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
name: 'Website Traffic Q1 2026',
objective: 'OUTCOME_TRAFFIC',
status: 'PAUSED',
special_ad_categories: [],
access_token: adToken,
}),
});
const { id: campaignId } = await campaignRes.json();
// Then create Ad Set (targeting + budget), Ad Creative, and Ad
// Each references the parent: campaign → ad set → ad creative → ad
// Use daily_budget in cents (2000 = $20/day), LOWEST_COST_WITHOUT_CAP bid strategy
Page posting schedule: 1-2 posts/day + Stories
Content mix:
Groups strategy (highest ROI):
User prompt: "I run a project management tool called TaskPilot. We have a Facebook Group with 3,400 members but engagement is dying. Create a plan to revive it."
The agent will create a weekly engagement framework for the TaskPilot Community group. Monday: "Workflow Wednesday Preview" poll asking members to vote on the next tutorial topic (options: Gantt charts, sprint boards, time tracking, resource allocation). Tuesday: resource sharing thread where members post their favorite productivity tools. Wednesday: step-by-step tutorial post with screenshots showing a specific TaskPilot workflow. Thursday: "Win of the Week" thread prompting members to share completed projects. Friday: casual off-topic discussion. The plan includes setting up 3 membership screening questions, enabling post approval for members under 14 days old, pinning community rules, creating themed Highlights from past valuable posts, and scheduling a monthly Live Q&A with the product team. Each post includes specific copy and engagement-driving CTAs like "Drop a screenshot of your dashboard setup below."
User prompt: "Write a TypeScript script that publishes a text post and a photo post to our Facebook Page (Greenleaf Nursery, page ID 108374625190283) and then fetches the page insights for the last 7 days."
The agent will create a TypeScript script that authenticates using a long-lived Page access token from environment variable FB_PAGE_TOKEN. It publishes a text post via POST /v19.0/108374625190283/feed with the message "Spring planting season is here! Visit us this weekend for 20% off all native perennials." Then it publishes a photo post via POST /v19.0/108374625190283/photos with a public image URL and caption. Finally, it fetches 7-day page insights by calling GET /v19.0/108374625190283/insights with metrics page_impressions,page_engaged_users,page_fans,page_views_total, period day, and date range parameters. The script logs each post's returned ID and prints the insights as a formatted table.
development
Expert guidance for Fireworks AI, the platform for running open-source LLMs (Llama, Mixtral, Qwen, etc.) with enterprise-grade speed and reliability. Helps developers integrate Fireworks' inference API, fine-tune models, and deploy custom model endpoints with function calling and structured output support.
development
Convert any website into clean, structured data with Firecrawl — API-first web scraping service. Use when someone asks to "turn a website into markdown", "scrape website for LLM", "Firecrawl", "extract website content as clean text", "crawl and convert to structured data", or "scrape website for RAG". Covers single-page scraping, full-site crawling, structured extraction, and LLM-ready output.
tools
Expert guidance for Firebase, Google's platform for building and scaling web and mobile applications. Helps developers set up authentication, Firestore/Realtime Database, Cloud Functions, hosting, storage, and analytics using Firebase's SDK and CLI.
development
When the user needs to build file upload functionality for a web application. Use when the user mentions "file upload," "image upload," "upload endpoint," "multipart upload," "presigned URL," "S3 upload," "file validation," "upload to cloud storage," or "accept user files." Handles upload endpoints, file validation (type, size, magic bytes), cloud storage integration, and upload status tracking. For image/video processing after upload, see media-transcoder.