facebook-marketing
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.
Best use case
facebook-marketing is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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.
Teams using facebook-marketing should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/facebook-marketing/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How facebook-marketing Compares
| Feature / Agent | facebook-marketing | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
Best AI Agents for Marketing
A curated list of the best AI agents and skills for marketing teams focused on SEO, content systems, outreach, and campaign execution.
SKILL.md Source
# Facebook Marketing
## Overview
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.
## Instructions
### Platform Rules & Algorithm
Facebook algorithm (2025-2026):
- **Meaningful interactions** — content that sparks conversations between people, not just brand-to-consumer
- **Groups priority** — Group content ranks higher than Page content in feed
- **Video (especially Reels)** — native video gets 2-3x more reach than links or images
- **Shares to Messenger** — private shares are a very strong signal
- **Comments with replies** — long comment threads boost distribution
- **Friends and family first** — personal connections outrank brand pages
What kills reach:
- Engagement bait ("Like if you agree", "Tag a friend who...")
- Clickbait headlines that don't deliver
- Links to low-quality websites
- Frequently shared misinformation content
- Posts flagged by users as irrelevant
### Content Formats
#### Reels (Primary organic reach)
- **Duration:** 15-90 seconds (30-60s optimal)
- **Aspect ratio:** 9:16 (1080x1920px) vertical
- **Hook:** First 3 seconds — text overlay or surprising visual
- **Captions:** Required — most watch without sound
- **Cross-posting:** Can auto-share to Instagram Reels
- **Music:** Use Facebook's licensed music library
#### Video (Native)
- **Duration:** 1-3 minutes for feed (60-90s highest engagement)
- **Aspect ratio:** 1:1 (square) or 4:5 for feed, 9:16 for Reels/Stories
- **Upload:** Native only — YouTube links get suppressed
- **Captions:** Auto-generated available, always enable
- **Live Video:** Gets priority in feed, sends notifications to followers
#### Images
- **Recommended:** 1200x630px for link shares, 1080x1080px for standalone
- **Carousel:** 2-10 images, each 1080x1080px
- **Infographics** perform well when shareable
- **Text on images:** Keep under 20% of image area (ad policy, also good for feed)
#### Text Posts (Pages & Groups)
- Keep under 250 characters for full visibility without "See more"
- Questions drive comments
- Polls built into Groups have high engagement
- Stories/anecdotes perform better than announcements
#### Links
- **Warning:** External links reduce organic reach significantly
- Post link in comments if possible
- If posting link directly: write compelling preview text, don't rely on auto-preview
- Use UTM parameters for tracking: `?utm_source=facebook&utm_medium=social&utm_campaign=name`
### Facebook Groups (Highest organic reach)
#### Creating an Engaged Group
```
Group 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
```
#### Group Moderation
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 Graph API
#### Authentication
```typescript
// 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;
```
#### Publish to Page
```typescript
// 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,
}),
});
```
#### Analytics
```typescript
// 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}`
);
```
### Facebook Ads (Marketing API)
#### Campaign Structure
```
Account
└── Campaign (objective: awareness, traffic, engagement, leads, sales)
└── Ad Set (targeting, budget, schedule, placements)
└── Ad (creative: image/video, copy, CTA)
```
#### Create Campaign via API
```typescript
// 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
```
### Growth Strategy
**Page posting schedule:** 1-2 posts/day + Stories
**Content mix:**
- 40% native video / Reels (highest organic reach)
- 25% community engagement (questions, polls, discussions)
- 20% images / carousels (shareable, saveable)
- 10% links (post in comments when possible)
- 5% live video (notifications sent to followers)
**Groups strategy (highest ROI):**
- Create a niche community around your topic
- Post daily prompts, answer questions personally
- Don't sell in the group — build trust, sell in DMs/links
- Feature community members (they share, expanding reach)
- Use Units for structured learning content
## Examples
### Example 1: Create a Facebook Group engagement strategy for a SaaS community
**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."
### Example 2: Build a Facebook Page posting automation with the Graph API
**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.
## Guidelines
- Native video > links > images for reach (algorithm preference order)
- Groups are the highest-ROI Facebook channel for organic growth in 2025-2026
- Don't link-dump — write valuable posts that happen to have links
- Post Reels to get non-follower reach (same mechanic as Instagram/TikTok)
- Facebook Ads: start with $10-20/day, test 3 ad variations, kill losers after 1000 impressions
- Use Lookalike audiences from your email list or website visitors for ads
- UTM parameters on every link — track what converts, not just what clicks
- Reply to every comment — extends post visibility and builds community
- Live Video sends push notifications — use it for announcements and Q&A
- Cross-post Reels to Instagram (native cross-posting from Meta Business Suite)Related Skills
youtube-marketing
Create, optimize, and manage YouTube content for channel growth, audience building, and monetization. Use when someone asks to "grow on YouTube", "optimize YouTube videos", "YouTube SEO", "YouTube Shorts strategy", "YouTube API integration", "automate YouTube uploads", "YouTube analytics", "YouTube thumbnail", or "YouTube content strategy". Covers long-form video, Shorts, SEO, thumbnail design, YouTube Data API, analytics, monetization, and growth strategies.
twitter-x-marketing
Create, optimize, and automate content for Twitter/X including tweets, threads, Spaces, and API automation. Use when someone asks to "write a tweet", "create a Twitter thread", "grow on X", "Twitter API integration", "automate tweeting", "Twitter analytics", "Twitter bot", or "X content strategy". Covers platform-specific formatting, X API v2 integration, thread creation, analytics, and growth tactics.
tiktok-marketing
Create, optimize, and automate TikTok content for brand awareness, audience growth, and conversions. Use when someone asks to "grow on TikTok", "create TikTok content", "TikTok marketing strategy", "TikTok API integration", "automate TikTok posting", "TikTok analytics", or "TikTok for business". Covers short-form video strategy, trending sounds, TikTok Content Posting API, analytics, and growth tactics.
product-marketing-context
When the user wants to create or update their product marketing context document. Also use when the user mentions 'product context,' 'marketing context,' 'set up context,' 'positioning,' or wants to avoid repeating foundational information across marketing tasks. Creates `.claude/product-marketing-context.md` that other marketing skills reference.
marketing-psychology
When the user wants to apply psychological principles, mental models, or behavioral science to marketing. Also use when the user mentions 'psychology,' 'mental models,' 'cognitive bias,' 'persuasion,' 'behavioral science,' 'why people buy,' 'decision-making,' or 'consumer behavior.' This skill provides 70+ mental models organized for marketing application.
marketing-plan
Create a comprehensive marketing plan — channels, messaging, content strategy, and growth tactics. Use when: planning marketing for a product launch, creating a content calendar, designing a go-to-market strategy.
marketing-ideas
When the user needs marketing ideas, inspiration, or strategies for their SaaS or software product. Also use when the user asks for 'marketing ideas,' 'growth ideas,' 'how to market,' 'marketing strategies,' 'marketing tactics,' 'ways to promote,' or 'ideas to grow.' This skill provides 139 proven marketing approaches organized by category.
linkedin-marketing
Create, optimize, and automate LinkedIn content for personal branding, lead generation, and B2B marketing. Use when someone asks to "write a LinkedIn post", "grow on LinkedIn", "LinkedIn content strategy", "LinkedIn API integration", "automate LinkedIn posting", "LinkedIn carousel", "LinkedIn analytics", or "LinkedIn outreach". Covers content creation with platform-specific formatting, API integration, analytics, and growth strategies.
instagram-marketing
Create, optimize, and automate Instagram content including Reels, Stories, carousels, and feed posts. Use when someone asks to "grow on Instagram", "create Instagram Reels", "Instagram content strategy", "Instagram API integration", "automate Instagram posting", "Instagram analytics", or "Instagram marketing". Covers Reels-first strategy, visual content guidelines, Instagram Graph API, and growth tactics.
zustand
You are an expert in Zustand, the small, fast, and scalable state management library for React. You help developers manage global state without boilerplate using Zustand's hook-based stores, selectors for performance, middleware (persist, devtools, immer), computed values, and async actions — replacing Redux complexity with a simple, un-opinionated API in under 1KB.
zoho
Integrate and automate Zoho products. Use when a user asks to work with Zoho CRM, Zoho Books, Zoho Desk, Zoho Projects, Zoho Mail, or Zoho Creator, build custom integrations via Zoho APIs, automate workflows with Deluge scripting, sync data between Zoho apps and external systems, manage leads and deals, automate invoicing, build custom Zoho Creator apps, set up webhooks, or manage Zoho organization settings. Covers Zoho CRM, Books, Desk, Projects, Creator, and cross-product integrations.
zod
You are an expert in Zod, the TypeScript-first schema declaration and validation library. You help developers define schemas that validate data at runtime AND infer TypeScript types at compile time — eliminating the need to write types and validators separately. Used for API input validation, form validation, environment variables, config files, and any data boundary.