Threads API - Unofficial, Reverse-Engineered Node.js/TypeScript client for Meta's [Threads](https://threads.net).
Summary
ts
await threadsAPI.publish({
text: '🤖 Threads with Sidecar',
attachment: {
sidecar: [
'https://raw.githubusercontent.com/junhoyeo/threads-api/main/threads-web-ui/app/opengraph-image.jpg?v=2',
'https://github.com/junhoyeo/threads-api/raw/main/.github/cover.jpg',
],
},
});
- ✨ We now support **Sidecar Attachments**! This means you can now upload _**multiple images**_, which is shown as a carousel in your threads.
- ✨ **The `publish` method's interface has been changed once again!** `url` and `image` options have been deprecated and replaced with a single `attachment` option which can be `{ url }`, `{ image }`, or `{ sidecar }`. This is more restrictive as Threads only permit a single rich attachment in the first place.
- 🛠️ Also, upload IDs will never collide in `uploadImage`. 🎉
- ✨ `ThreadAPI` related types had been refactored into `namespace ThreadsAPI`. (See https://github.com/junhoyeo/threads-api/pull/198)
- 📌 Note: we still have full backward compatibility with the previous version!
What's Changed
* [web-ui] Workaround for overflow: hidden + border-radius bug in Safari by junhoyeo in https://github.com/junhoyeo/threads-api/pull/193
* [root] Fix .prettierrc to work inside VSCode by junhoyeo in https://github.com/junhoyeo/threads-api/pull/194
* web-ui(landing): Revalidate stargazers count every 60 seconds, Add missing link by junhoyeo in https://github.com/junhoyeo/threads-api/pull/195
* web-ui(apps): Initialize App Registry by junhoyeo in https://github.com/junhoyeo/threads-api/pull/196
* [web-ui] Add favicons by junhoyeo in https://github.com/junhoyeo/threads-api/pull/197
* web-ui(apps): Show community-made apps in App Registry by junhoyeo in https://github.com/junhoyeo/threads-api/pull/199
* web-ui(landing): Add opengraph image by junhoyeo in https://github.com/junhoyeo/threads-api/pull/200
* feat: add `attachment.sidecar` publish option by aleclarson in https://github.com/junhoyeo/threads-api/pull/198
* docs: Update README.md by junhoyeo in https://github.com/junhoyeo/threads-api/pull/202
**Full Changelog**: https://github.com/junhoyeo/threads-api/compare/v1.4.7...v1.5.0