GitShow/facebook/facebook-ruby-business-sdk
facebook

facebook-ruby-business-sdk

Ruby SDK for Meta Marketing API

by facebook
Star on GitHubForkWebsite

Ruby

214 stars167 forks59 contributorsActive · 2w agoSince 2015v25.0.3

Meet the team

See all 59 on GitHub →
jingping2015
jingping201550 contributions
marksliva
marksliva23 contributions
stcheng
stcheng14 contributions
satwikareddy3
satwikareddy313 contributions
alanho
alanho13 contributions
vicdus
vicdus9 contributions
HeyMultiverse
HeyMultiverse6 contributions
windsfantasy6
windsfantasy64 contributions

Languages

View on GitHub →
Ruby100%

Commit activity

Last 12 weeks · 15 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 →
olleolleolle
gemspec: Allow Countries gem 8.xOpenPR

This PR unpins the Countries gem, allowing newer versions of it. This is the same as #213 but with a new version.

olleolleolle · 6d ago
scottgratton
Concurrent first use of ad_object classes deadlocks under multithreading (autoload of interdependent class graph)OpenIssue

Summary On 25.0.2 (Ruby 3.3), the first concurrent reference to the SDK's classes permanently deadlocks the process on Ruby's autoload/require lock. No exception is raised — the threads hang forever — so it's a silent failure that hits any multithreaded host (Sidekiq, Puma, parallel test runners). Reproduction One command — run as plain Ruby, not inside a Rails console (Rails' own autoloader wraps and masks the gem-level behavior): On 25.0.2 + Ruby 3.3 this prints, every run: All 18 threads are wedged in the autoload — backtraces are parked at: Warming the classes single-threaded first — one pass before the threads — prints . So it's the concurrent first load that deadlocks, not the classes themselves: (The is only there so the script terminates instead of hanging on the wedged threads at exit.) Root cause registers every class with Ruby . A class body's / declarations resolve their types at definition time via → (), which triggers the autoload of the referenced class — whose body resolves its fields, autoloading more. The graph is large (~1000 classes) and circularly interdependent. Ruby is not safe for concurrent loading of interdependent files: two threads autoloading constants whose files transitively require each other each hold one in-progress load and block on the other — a circular wait on the global require lock that never resolves. Because a deadlocked thread raises nothing, there's no error or alert; the process just stops making progress on anything touching the SDK. Impact Any multithreaded Ruby host that first-references SDK classes concurrently. It's a cold-start effect — a fresh process is vulnerable only until the graph is fully loaded — so it surfaces right after boots/deploys and looks intermittent (only processes that lose the race wedge). Suggested fix Provide a public (or load the graph at time) so applications can warm it single-threaded at boot; or serialize / autoload resolution behind a mutex. Workaround Eager-load the graph once at boot, single-threaded, before spawning worker threads: Minor, separate:* that sweep also surfaces 6 files that ship with s and appear deprecated: , , , , , .

scottgratton · 1w ago
crespire
Ruby codegen emits invalid `has_edge :` (empty edge name) for 5 ad objectsOpenIssue

Description The Ruby SDK codegen produces with an empty edge name for 5 ad object classes. This is not a valid Ruby symbol literal and causes a at load time. The Python codegen handles these same objects correctly, emitting named methods (/) with . Affected classes Expected behavior The codegen should emit a named edge, e.g.: Actual behavior This raises when the file is loaded. Impact Currently low — these files are autoloaded and nothing references them, so the error is silent. However, this becomes a blocker for any consumer that needs to eager-load the gem (e.g., for thread-safety in Rails/Sidekiq environments) or for consumers that end up needing to use these edges. Introduced in Commit ("Auto-generated ruby SDK code update", D95913002). These files have never had valid edge names.

crespire · 1w ago

Recent fixes

View closed PRs →
crespire
Simmon/fix empty identifiersMergedPR
crespire · 2mo ago
crespire
Simmon/merge upstream 2026 04MergedPR
crespire · 2mo ago
crespire
[hotfix] Object IDMergedPR

Fix object ID method shadowing to resolve Ruby warnings.

crespire · 4mo ago
Structured data for AI agents

Repository: facebook/facebook-ruby-business-sdk. Description: Ruby SDK for Meta Marketing API Stars: 214, Forks: 167. Primary language: Ruby. Languages: Ruby (100%). Homepage: https://developers.facebook.com/docs/business-sdk Latest release: v25.0.3 (3w ago). Open PRs: 14, open issues: 28. Last activity: 2w ago. Community health: 75%. Top contributors: jingping2015, marksliva, stcheng, satwikareddy3, alanho, vicdus, HeyMultiverse, windsfantasy6, shuaiwa-meta, kongxinzhu and others.

·@ofershap

Replace github.com with gitshow.dev