marketing

facebook-php-business-sdk – Accelerate Meta ad campaigns with PHP

A lean PHP SDK that lets founders integrate the Meta Marketing API fast, enabling automated ad creation, reporting, and audience management.

From the repo · “PHP SDK for Meta Marketing API”

intermediate⏱ 1-2 hours💵 Free (self-hosted)
919 stars+2★ this week532 forksPHPGuide quality 8/10 · reviewed Oct 18Updated 9/21/2026100% free · open source
What it is

Uses Facebook's Marketing API to manage your marketing campaigns via a PHP interface.

Real use case example

"A founder, Emma, uses this skill to update her Shopify order management system whenever a Facebook ad lead becomes a customer, allowing her to better track sales."

Best insideClaude DesktopClaude Code
When to use it
  • •When you need to automate ad campaigns and ad management on Meta platforms
  • •When you want to integrate Meta marketing capabilities into your existing PHP application or website
  • •When you need to retrieve insights and analytics on your Meta ad performance programmatically
Ready-to-paste prompt
$sdk->createAd('AD_NAME', 'ADSET_ID', 'AD CREATIVE ID', 'AD_TARGETING');
Heads up: You need a Meta Developer account and a registered application to obtain an app ID, app secret, and access token, which are required to authenticate and authorize API requests made through the SDK
Saves to your device
Use with Claude
New

Skip the builder — one click puts this in Claude, Cursor, Antigravity and more.

🛠️ Technical setup

Expect 20–40 minutes in a terminal — or let your AI agent drive it.

Try it instantly — no install
Claude Code
mkdir -p ~/.claude/skills/facebook-php-business-sdk && curl -fsSL https://workflowstacks.com/api/skills/facebook-php-business-sdk/claude-skill -o ~/.claude/skills/facebook-php-business-sdk/SKILL.md
Open in another AI app

Opens the app with this repo with the prompt ready to go — no copy-paste needed.

Connect the whole catalog (MCP)
claude mcp add --transport http workflowstacks https://workflowstacks.com/api/mcp

Adds a WorkflowStacks connector to Claude Code: search and load any skill here by chatting.

How facebook-php-business-sdk – Accelerate Meta ad campaigns with PHP works
Codeflow
Free to inspect

Facebook-php-business-sdk – Accelerate Meta ad campaigns with PHP is a very large PHP project (~142k lines across 3062 code files, plus 89 test files). It is a full software project: use it through its install path rather than reading it end to end. Last commit a month ago, Other license, has a test suite.

Size
Very large codebase
~142k lines · 3062 code files · days to read — use, don't read
Setup
Developer setup
A real software project. Use it via its install path; don't expect to read it all.
Runs on
PHP
No API keys detected
PHP 100%
Where to start reading
  1. 1
    README.md
    Start here — what it does and how to install it
  2. 2
    bin/docsmith.php
    Where the program starts running
  3. 3
    composer.json
    Dependencies and the commands it exposes
  4. 4
    src/FacebookAds/AnonymousSession.php
    Inside src/ — the main logic begins here
  5. 5
    examples/AdAccountAdCreativesEdge.php
    A worked example — copy this to get going
What's in each folder
src/Core code — the actual logic2913 files
bin/Command-line entry points4 files
examples/Examples you can copy148 files
test/Tests — proof it works95 files
.github/CI / automation (GitHub Actions)2 files
READMEHas testsDocumentedCI checksExamples includedOther licenseUpdated 1 mo ago
Quick Actions
Details
Creator
facebook
Language
PHP
Category
marketing
Published
6/16/2014

Are you the creator of this tool? and earn 85% of every sale.

Show it off in your README:

Featured on WorkflowStacks
[![Featured on WorkflowStacks](https://workflowstacks.com/api/badge/facebook-php-business-sdk.svg)](https://workflowstacks.com/skills/facebook-php-business-sdk?utm_source=github&utm_medium=badge)
🔥 Hot this week, in your inbox
Skills like this, every Monday.

The five fastest-growing open-source AI skills, ranked by GitHub star growth. One email a week, unsubscribe anytime.

Do this with a working workflow

Pages we wrote and tested that put a skill like this to work — importable n8n templates, outcome guides and Claude Desktop configs.

Ready-to-run pack · one-time $29

Rank Tracker

A weekly email of where you actually rank on Google.

Includes the tested workflow and a written setup playbook. Needs: SerpAPI key (free tier).

See what you get