The Facebook Business SDK for Node.js (v24.0.1) is the official SDK from Meta for interacting with the Facebook Marketing API, Pages API, Business Manager API, Instagram API, and other Facebook APIs. Released monthly in sync with API version updates, it supports both server-side (Node.js) and client-side (browser) usage via UMD/AMD/CommonJS modules. Key differentiators: bundles multiple Facebook APIs into one SDK, includes request-level retry logic, and provides TypeScript definitions. Compared to raw HTTP requests or third-party wrappers, it handles authentication, rate limiting, and pagination automatically. Requires a Facebook App ID and access token; deprecated features are communicated via version bumps.
npm install facebook-nodejs-business-sdkVerified import paths — ran on the pinned version, not inferred.
Initialize the SDK, create an AdAccount object, and fetch ad sets with specific fields.
Migrate to Advantage+ setup using the streamlined Automation Unification. Use 'adv campaign' parameter instead.
Replace with new metrics as per Facebook Ads Insights migration guide.
Set 'dynamic_media' parameter to false in ad creative when creating ads.
Review weekly spend limits; adjust campaign budget optimization settings to keep daily budget within bounds.
Remove them; they have no effect.
Always call FacebookAdsApi.init(accessToken, appSecret) as the first step.
Ensure you call FacebookAdsApi.init(accessToken, appSecret) with valid strings.
Use FacebookAdsApi.init(accessToken, appSecret) instead of new.
Check that all required fields are included and are correct per the Marketing API documentation for your SDK version.