Socials module: publish to and read from Instagram and Threads; read from YouTube.
Each platform exposes one publishing method — createInstagramPost,
createThreadsPost — that picks the right media type from what you pass.
The container/publish steps underneath are an implementation detail.
Layout: socials/meta/ is the Graph protocol Instagram and Threads share;
each platform gets its own folder. A platform on a different API brings its own
client and exposes its own create<Platform>Post.
Reading is normalized where publishing is not. Every platform's OAuth, profile
and content endpoints collapse onto one SocialProvider shape — see
InstagramProvider, YouTubeProvider — so a consumer stores one row shape per connected
account whatever the platform. Publishing stays per-platform on purpose: the
inputs diverge too far (text-only posts, stories, carousels, reply controls)
for a shared signature to describe honestly.
Anything this module doesn't wrap is still reachable: getInstagramData
and getThreadsData call the Graph API directly with the base URL and
version already pinned, so a one-off endpoint needs no new helper here.
Socials module: publish to and read from Instagram and Threads; read from YouTube.
Each platform exposes one publishing method — createInstagramPost, createThreadsPost — that picks the right media type from what you pass. The container/publish steps underneath are an implementation detail.
Layout:
socials/meta/is the Graph protocol Instagram and Threads share; each platform gets its own folder. A platform on a different API brings its own client and exposes its owncreate<Platform>Post.Reading is normalized where publishing is not. Every platform's OAuth, profile and content endpoints collapse onto one SocialProvider shape — see InstagramProvider, YouTubeProvider — so a consumer stores one row shape per connected account whatever the platform. Publishing stays per-platform on purpose: the inputs diverge too far (text-only posts, stories, carousels, reply controls) for a shared signature to describe honestly.
Anything this module doesn't wrap is still reachable: getInstagramData and getThreadsData call the Graph API directly with the base URL and version already pinned, so a one-off endpoint needs no new helper here.
Example