GitShow/facebook/facebook-php-business-sdk
facebook

facebook-php-business-sdk

PHP SDK for Meta Marketing API

by facebook
Star on GitHubForkWebsite

PHP

915 stars530 forks139 contributorsActive · 2w agoSince 201426.0.0

Meet the team

See all 139 on GitHub →
jingping2015
jingping201560 contributions
duliomatos
duliomatos29 contributions
paulbain
paulbain25 contributions
pruno
pruno22 contributions
marksliva
marksliva19 contributions
satwikareddy3
satwikareddy313 contributions
stcheng
stcheng11 contributions
HeyMultiverse
HeyMultiverse8 contributions

Languages

View on GitHub →
PHP100%

Commit activity

Last 12 weeks · 16 commits

Full graph →

Community health

5 of 6 standards met

Community profile →
75
✓README✓License✓Contributing✓Code of Conduct✓Issue Template○PR Template

Recent PRs & issues

Active · Last activity 2w ago
See all on GitHub →
justpilot
v25.0.2: Class "FacebookAds\PII_DATA_TYPE" not found when calling EventRequest::execute()OpenIssue

fatals: (v25.0.2) throws whenever the caller did not also call . Introduced in v25.0.2 by the new dependency (commit ). v25.0.0 and v25.0.1 are unaffected. Versions 25.0.2 1.3.1 PHP 8.5 / Composer 2.10.1 Reproducer Adding before makes the fatal go away. Cause line 28 imports and references etc. inside (lines 936-946). lives in under . The package declares PSR-4 as , which means Composer looks for the class at and can't find it. The class only becomes available as a side effect of being autoloaded — it does at the top. is instantiated only inside (). Callers that pre-populate and skip never trigger that load, and fatals on the first reference. Fix Add a autoload entry to 's : Or move to a PSR-4-compliant path. Either way becomes loadable without depending on being instantiated first. Workaround for users on v25.0.2

justpilot · 2w ago
bretterer
UserData::normalize() fatals in 25.0.2 — depends on unautoloadable FacebookAds\PII_DATA_TYPE from capi-param-builder-php 1.3.1OpenIssue

Summary 25.0.2 moved PII normalization out of the SDK and into . That package's 1.3.1 release ships in , which violates PSR-4 ( → , so the class must be in ). Composer can't autoload it, so any call into fatals: This makes 25.0.2 unusable for the Conversions API out of the box. Reproduction 25.0.1 works (self-contained, no dependency). Environment 25.0.2, 1.3.1, Composer 2.9.5, PHP 8.4. Root cause / fix Upstream in , filed separately: https://github.com/facebook/capi-param-builder/issues/36 Until that's fixed, 25.0.2 should either pin a fixed release or restore the bundled . Users can work around by pinning .

bretterer · 1mo ago
nei
fix: properly release CurlHandle in __destruct() for PHP 8.0+OpenPR

fails to close curl handles on PHP 8.0+, leaving TCP sockets open in for the lifetime of the PHP process. Two separate incompatibilities compound the problem: 1. returns on PHP 8.0+ because now returns a object, not a — the guard condition is never true, so the entire block is skipped 2. Even if the block were reached, is a no-op on PHP 8.0+ — the socket is only released when the object is destroyed via / GC ## Root cause ## Fix Also updates the docblock on from to . ## PHP 8.0 migration context return type changed from to object — PHP 8.0 migration guide returns for — type checks must use is now a no-op; the PHP docs recommend explicit to release the handle ## Impact In a long-running PHP CLI process (e.g. a Magento cron job), every HTTP call that ends with the remote closing the connection leaves an orphaned socket. These accumulate without bound and can exhaust file descriptors on high-uptime servers. We observed this in production with (runs every 20 minutes). A single cron process had been running for 15+ hours with open Facebook sockets visible via : ## Environment

nei · 2mo ago

Recent fixes

View closed PRs →
weibol
Update AppData.phpMergedPR
weibol · 2mo ago
weibol
Update ExtendedDeviceInfo.phpMergedPR
weibol · 2mo ago
xDemonME
feat(UserData): add ig_account_id and ig_sid parameters per CAPI docsMergedPR

Summary This PR adds support for two Conversions API parameters that are already available in the API but currently missing in the SDK: — Instagram Account ID associated with the business. — Instagram Scoped User ID. These fields are documented in the public CAPI reference and can improve event matching for Instagram traffic. References Customer Information Parameters – Meta CAPI docs Changes Added properties, getters, and setters for and in . Updated serialization logic Added PHPUnit test Backwards Compatibility Additive change only; no impact on existing integrations. Testing All existing test suites pass. Manually tested serialization to confirm correct output.

xDemonME · 4mo ago
Structured data for AI agents

Repository: facebook/facebook-php-business-sdk. Description: PHP SDK for Meta Marketing API Stars: 915, Forks: 530. Primary language: PHP. Languages: PHP (100%). Homepage: https://developers.facebook.com/docs/business-sdk Latest release: 26.0.0 (2w ago). Open PRs: 13, open issues: 20. Last activity: 2w ago. Community health: 75%. Top contributors: jingping2015, duliomatos, paulbain, pruno, marksliva, satwikareddy3, stcheng, HeyMultiverse, kongxinzhu, vicdus and others.

·@ofershap

Replace github.com with gitshow.dev