@redonvn/messaging-threads
v1.0.0
Published
Enterprise Meta Threads Conversation & Reply Management SDK (2-Step Reply Container, Flat/Nested Conversation & Moderation)
Keywords
Readme
@redai/messaging-threads — Official Meta Threads Graph API SDK for RedAI Omnichat
SDK TypeScript chuẩn kiến trúc Speakeasy 4-Layer đóng gói 100% Official Meta Threads API (https://graph.threads.net/v1.0), phục vụ quản trị hội thoại đa cấp, phản hồi tự động, lắng nghe mạng xã hội (@mentions & Keyword Search) và phân tích dữ liệu trên RedAI Omnichat.
5 Sub-SDK Chuyên Sâu
client.publishing(aliasclient.posts— 13 methods):- Quy trình 2 bước tạo Container & Xuất bản cho
TEXT,IMAGE,VIDEO(tự động poll trạng tháiIN_PROGRESS$\rightarrow$FINISHED), vàCAROUSEL(2..20phần tử). - Hỗ trợ
quotePost(quote_post_id),repost(POST /{media-id}/repost),deletePost(DELETE /{media-id}), kiểm soát quyền trả lờireplyControl(everyone,accounts_you_follow,mentioned_only),topicTag,linkAttachment, và kiểm tra hạn mứcgetPublishingLimit()(250 posts & 1.000 replies / 24h).
- Quy trình 2 bước tạo Container & Xuất bản cho
client.conversations(14 methods):createAndPublishReply,replyWithMedia,getConversation(cây hội thoại phẳng/{media-id}/conversation),getTopLevelReplies(/{media-id}/replies),getUserReplies,getMentions(/{user-id}/mentions),hideReply/unhideReply(/{reply-id}/manage_reply),searchKeywords(/keyword_search),getMediaById,listUserThreads.
client.profiles(7 methods):getMe,getUserProfile,lookupPublicProfile(/profile_lookup?username=...),getPublicProfilePosts.- Quản lý trọn vẹn vòng đời OAuth 2.0 Token của Threads:
exchangeCodeForShortLivedToken(1 giờ) $\rightarrow$exchangeForLongLivedToken(60 ngày) $\rightarrow$refreshLongLivedToken(gia hạn 60 ngày).
client.insights(2 methods):getMediaInsights(views,likes,replies,reposts,quotes,shares) &getAccountInsights(kèm nhân khẩu họcfollower_demographicstheocountry,city,age,gender).
client.webhook(5 methods):- Xác thực GET
hub.challenge, kiểm tra chữ kýX-Hub-Signature-256(HMAC-SHA256) và bóc tách sự kiệnreplies,mentions,delete,publish.
- Xác thực GET
Cấu Trúc Tài Liệu
- Hướng dẫn sử dụng nhanh (
USAGE.md) - Danh mục Models & Types (
docs/models/models.md) - Tài liệu từng Sub-SDK:
client.publishing— Đăng bài, Reply, Carousel, Quote, Repost, Delete & Quotaclient.conversations— Cây hội thoại, Replies, Mentions, Keyword Search & Moderationclient.profiles— Hồ sơ, Public Profile Lookup & Vòng đời OAuth 2.0 Tokenclient.insights— Thống kê bài đăng, phản hồi & nhân khẩu họcclient.webhook— Xác thực chữ ký & Giải mã sự kiện Webhook
- Tài liệu tích hợp Backend RedAI Omnichat (
../../docs/02_THREADS_CONVERSATION_API.md)
