npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@nazzelofficial/bituin-fca

v1.12.7

Published

Advanced Facebook Chat API library for Node.js/TypeScript with anti-ban features, real-time messaging, and comprehensive bot functionality

Readme

Bituin-FCA

npm version CI License: MIT TypeScript Node.js Version Downloads GitHub Stars

Advanced Facebook Chat API library for Node.js/TypeScript. A modern, feature-rich alternative to facebook-chat-api with enhanced security, anti-ban measures, and comprehensive Messenger functionality.

Core Features

  • Multiple Authentication Methods - Email/password, session import, and account.txt support
  • Real-time Messaging - MQTT WebSocket for instant message delivery
  • GraphQL API - Full Facebook GraphQL integration
  • File Uploads - Images, videos, audio, files, and stickers
  • Anti-Ban System - Intelligent rate limiting, fingerprint rotation, human-like behavior
  • Custom Command System - Build your own bot commands with cooldowns and permissions
  • Plugin System - Extensible plugin architecture

Advanced Features

  • Sticker & Custom Emoji - Send stickers and custom emojis
  • Thread Themes - Customize thread colors and themes
  • Message Translation - Translate messages to 30+ languages
  • Analytics Dashboard - Real-time bot analytics
  • Cross-Platform Notifications - Discord, Telegram, Slack webhooks
  • Email Digests - Daily/weekly message summaries
  • AI Features - Smart replies, sentiment analysis, spam detection
  • Call Integration - Voice/video call detection and management
  • Location Sharing - Share and receive locations
  • Polls - Create and manage polls
  • Stories - View and interact with stories
  • E2E Encryption - End-to-end message encryption

Anti-Detection Suite

  • FingerprintManager - Session fingerprint management with 6hr auto-rotation
  • RequestObfuscator - Multi-layer request obfuscation with entropy injection
  • PatternDiffuser - Adaptive delays to prevent detectable patterns
  • TrafficAnalysisResistance - Timing jitter and traffic variability
  • SmartRateLimiter - Intelligent message pacing with anti-ban integration
  • MQTTProtection - Obfuscated MQTT traffic with keep-alive
  • DeviceIDGenerator - Realistic device IDs from system hardware
  • UserAgentRotator - Latest Chrome/Edge configurations with rotation
  • AutoCookieRefresh - Fresh cookies every 20min + MQTT keep-alive every 30s

Social Interaction Features

  • MessageEditor - Edit bot's messages in-place
  • PostInteractionManager - Comment and reply to public Facebook posts
  • FollowManager - Follow/unfollow users automation
  • ProxyManager - Full proxy support with testing utilities

Group & Private Message Management

  • GroupChatManager - Welcome/leave messages, announcements, moderation, warnings, muting
  • PrivateMessageManager - Quick replies, templates, auto-responses, conversation tracking
  • MessengerBotManager - Multi-prefix commands, permissions, scheduled messages, anti-spam

Bot Utility Suite

  • MessageScheduler - Schedule messages for future delivery (one-time or recurring)
  • AutoModerator - Automatic moderation with word filters, spam detection, warnings, muting
  • ConversationLogger - Log and analyze conversations with search, stats, and export
  • BotStatistics - Comprehensive analytics (messages, commands, users, uptime, leaderboards)
  • ResponseTemplateManager - Reusable response templates with variable substitution
  • WebhookNotifier - Send notifications to Discord, Slack, Telegram webhooks
  • CommandCooldownManager - Advanced cooldown system per user/thread with bypass options
  • UserPermissionSystem - Role-based permissions with inheritance and granular control

Installation

npm install bituin-fca

or

yarn add bituin-fca

Quick Start

Using account.txt (Recommended)

import { BituinFCA } from 'bituin-fca';

const bot = new BituinFCA({
  appStatePath: 'account.txt',
  commandPrefix: '!',
  enableAntiBan: true
});

// Login with account.txt
await bot.loginWithAppState();

// Listen for messages
bot.on('message', (msg) => {
  console.log(`${msg.senderID}: ${msg.body}`);
});

// Send a message
await bot.sendMessage({
  threadID: '123456789',
  message: 'Hello from Bituin-FCA!'
});

Using Email/Password

import { BituinFCA } from 'bituin-fca';

const bot = new BituinFCA();

// Login with credentials
const success = await bot.loginWithEmail('[email protected]', 'password');

if (success) {
  // Save session as account.txt for future use
  await bot.saveAppState();
}

Using Session Import

import { BituinFCA } from 'bituin-fca';

const bot = new BituinFCA();

// Import base64-encoded session
await bot.loginWithSession(base64SessionData);

account.txt Format

The account.txt file uses a clean, minimal cookie format:

[
  {
    "key": "dbln",
    "value": "",
    "domain": ".facebook.com",
    "path": "/login/device-based/",
    "hostOnly": false,
    "expires": "",
    "creation": "",
    "lastAccessed": ""
  },
  {
    "key": "datr",
    "value": "",
    "domain": ".facebook.com",
    "path": "/",
    "hostOnly": false,
    "expires": "",
    "creation": "",
    "lastAccessed": ""
  },
  {
    "key": "sb",
    "value": "",
    "domain": ".facebook.com",
    "path": "/",
    "hostOnly": false,
    "expires": "",
    "creation": "",
    "lastAccessed": ""
  },
  {
    "key": "c_user",
    "value": "",
    "domain": ".facebook.com",
    "path": "/",
    "hostOnly": false,
    "expires": "",
    "creation": "",
    "lastAccessed": ""
  },
  {
    "key": "xs",
    "value": "",
    "domain": ".facebook.com",
    "path": "/",
    "hostOnly": false,
    "expires": "",
    "creation": "",
    "lastAccessed": ""
  },
  {
    "key": "vpd",
    "value": "",
    "domain": ".facebook.com",
    "path": "/",
    "hostOnly": false,
    "expires": "",
    "creation": "",
    "lastAccessed": ""
  },
  {
    "key": "ps_l",
    "value": "",
    "domain": ".facebook.com",
    "path": "/",
    "hostOnly": false,
    "expires": "",
    "creation": "",
    "lastAccessed": ""
  },
  {
    "key": "ps_n",
    "value": "",
    "domain": ".facebook.com",
    "path": "/",
    "hostOnly": false,
    "expires": "",
    "creation": "",
    "lastAccessed": ""
  },
  {
    "key": "pas",
    "value": "",
    "domain": ".facebook.com",
    "path": "/",
    "hostOnly": false,
    "expires": "",
    "creation": "",
    "lastAccessed": ""
  },
  {
    "key": "wl_cbv",
    "value": "",
    "domain": ".facebook.com",
    "path": "/",
    "hostOnly": false,
    "expires": "",
    "creation": "",
    "lastAccessed": ""
  },
  {
    "key": "fbl_st",
    "value": "",
    "domain": ".facebook.com",
    "path": "/",
    "hostOnly": false,
    "expires": "",
    "creation": "",
    "lastAccessed": ""
  },
  {
    "key": "wd",
    "value": "",
    "domain": ".facebook.com",
    "path": "/",
    "hostOnly": false,
    "expires": "",
    "creation": "",
    "lastAccessed": ""
  },
  {
    "key": "fr",
    "value": "",
    "domain": ".facebook.com",
    "path": "/",
    "hostOnly": false,
    "expires": "",
    "creation": "",
    "lastAccessed": ""
  },
  {
    "key": "presence",
    "value": "",
    "domain": ".facebook.com",
    "path": "/",
    "hostOnly": false,
    "expires": "",
    "creation": "",
    "lastAccessed": ""
  }
]

Essential Cookies

Only these cookies are required for authentication:

  • c_user - Your Facebook user ID
  • xs - Session token

Recommended Cookies

For better functionality, include:

  • datr - Browser tracking cookie
  • sb - Session cookie

Optional Cookies

Additional cookies like fr, locale, wd, presence, vpd, fbl_st, wl_cbv, pas, ps_l, ps_n may improve stability.

Creating Custom Commands

Bituin-FCA provides a flexible command system. Create your own custom commands by adding files to your src/commands directory:

// src/commands/hello.ts
import { Command } from 'bituin-fca';

export const command: Command = {
  name: 'hello',
  description: 'Say hello to the user',
  usage: '!hello [name]',
  cooldown: 3000, // 3 seconds cooldown
  
  async execute(ctx, args) {
    const name = args[0] || 'there';
    await ctx.sendMessage({
      threadID: ctx.message.threadID,
      message: `Hello, ${name}!`
    });
  }
};

Configuration

interface BituinFCAConfig {
  sessionPath?: string;      // Path to account file (default: 'account.txt')
  appStatePath?: string;     // Path to account file (default: 'account.txt')
  encryptionKey?: string;    // Key for encrypting session/appstate
  commandPrefix?: string;    // Command prefix (default: '!')
  enableAntiBan?: boolean;   // Enable anti-ban measures (default: true)
  enablePlugins?: boolean;   // Enable plugin system (default: true)
  enableCommands?: boolean;  // Enable command system (default: true)
}

Documentation

Anti-Ban Features

Bituin-FCA includes comprehensive anti-ban measures:

  • Request Throttling - Intelligent delays between requests
  • User-Agent Rotation - Realistic browser fingerprints
  • Human Simulation - Random delays and patterns
  • Checkpoint Detection - Automatic handling of security checks
  • Health Monitoring - Track account health score
  • Automatic Cooldown - Reduce activity when suspicious

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Disclaimer

This is NOT an official Facebook API. Using unofficial APIs may violate Facebook's Terms of Service. Use at your own risk. This library is for educational purposes only.

Salamat / Thank You / Acknowledgments

Maraming salamat sa lahat ng nag-contribute at gumamit ng Bituin-FCA!

  • Inspired by facebook-chat-api and fca-unofficial
  • Salamat sa mga early adopters at testers ng library
  • Salamat sa Filipino developer community para sa support
  • Built with TypeScript for type safety
  • Uses modern Node.js features

Special thanks to:

  • Schmavery - Original facebook-chat-api creator
  • lequanglam - fca-unofficial maintainer
  • @dongdev - fca-unofficial inspiration
  • Filipino Bot Developers Community - Continuous feedback and support
  • All Contributors - Everyone who submitted issues, PRs, and suggestions

Links

Support


Made with love by Nazzel Development