socialchimp¶
One simple way to connect your app to social networks.
Your app needs to let people connect their social accounts, then post for them and read what happens. Every network does this differently - a different sign-in flow, a different way tokens die and get renewed, a different idea of what "300 characters" even means. socialchimp gives you one way to do all of it, and gets out of the way when you need a network's own features.
- Mastodon
- Bluesky
- Facebook Pages
- YouTube
- TikTok
- X
- Threads
It does not touch your database - no models, no migrations. You write a small storage class, socialchimp hands you the data to save, and your schema stays yours. It does not pretend the networks are the same, either: Pinterest needs a board, Bluesky cannot schedule, YouTube has no text-only post. Where a network genuinely cannot do something, the answer says so by name instead of guessing.
One example¶
Once somebody has connected an account - the tutorial covers signing them in - posting for them looks like this:
from socialchimp import SocialChimp, Post
sc = SocialChimp(storage=my_storage)
account = sc.account(connection_id)
result = await account.post(Post(text="Hello from socialchimp"))
print(result.url)
my_storage is five methods you write once; connection_id is whichever
account you saved when that person signed in. Need something only Mastodon
can do? account.direct.post(...) sends a request of your own through the
same token, the same retries, and the same rate limits.
Where to go next¶
Install¶
Add a framework if you want the ready-made sign-in and webhook routes:
See Frameworks for what those routes do, and Getting started for the ten-minute version that goes from nothing to a real post on Mastodon.