Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 89 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,103 @@
# fca-redux

> [!WARNING]
> This project is currently **under development**. Features may be incomplete, and breaking changes can occur at any time.
> This project is currently **under development**. Features may be incomplete, and breaking changes can occur at any time. Use with caution.

A TypeScript rewrite of the Nero Facebook Client API.
A modern, robust **TypeScript** rewrite of the Nero Facebook Client API (and its predecessors). This library allows you to programmatically interact with Facebook's private API to send messages, listen to events, and manage interactions.

## Features
- Messaging (Send, Unsend, Mark as Read, Reactions)
- MQTT Realtime Listener
- User Information retrieval
- Modern TypeScript implementation
- Integrated Debugging & Logging

- **Messaging**: Send text, attachments, stickers, and handle replies.
- **Realtime**: MQTT-based listener for instant message reception.
- **Reactions**: React to messages programmatically.
- **User Info**: Retrieve detailed user profiles.
- **Safety**: Unsend messages and manage thread settings.
- **Developer Experience**:
- Full TypeScript support with type definitions.
- Integrated debugging and logging utilities.
- customizable options (User Agent, auto-reconnect, etc.).
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent capitalization in the sentence. The word "customizable" should be capitalized to match the style of other bullet points in this list, which all start with capital letters.

Suggested change
- customizable options (User Agent, auto-reconnect, etc.).
- Customizable options (User Agent, auto-reconnect, etc.).

Copilot uses AI. Check for mistakes.

## Installation

```bash
npm install
npm install fca-redux
```

## Build
```bash
npm run build
## Quick Start

Here is a simple example of how to log in using an `appState` (cookies) and listen for incoming messages.

```typescript
import { login } from 'fca-redux';
// Or: import fca from 'fca-redux';

// Your 'appState.json' contains the cookies from a logged-in session.
const credentials = {
appState: require('./appState.json')
Comment on lines +33 to +36
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code example uses require() for importing JSON, which is CommonJS syntax, while the rest of the example uses ES6 import syntax. This creates a mixing of module systems that may not work in all TypeScript configurations. Consider showing both approaches or using a more TypeScript-friendly approach like importing from a variable or using dynamic import.

Suggested change
// Your 'appState.json' contains the cookies from a logged-in session.
const credentials = {
appState: require('./appState.json')
import appState from './appState.json';
// Your 'appState.json' contains the cookies from a logged-in session.
const credentials = {
appState

Copilot uses AI. Check for mistakes.
};

const options = {
listenEvents: true,
selfListen: false
};

login(credentials, options, (err, api) => {
if (err) {
console.error('Login failed:', err);
return;
}

console.log('Login successful!');

// simple echo bot example
api.listenMqtt((err, message) => {
if (err) return console.error(err);

if (message.type === 'message') {
api.sendMessage(`You said: ${message.body}`, message.threadID);
}
});
});
```

## Development

To set up the project locally for development:

1. **Install dependencies:**
Copy link

Copilot AI Jan 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent spacing in numbered list. All other numbered list items in the "Contributing" section use a period followed by two spaces before the text (e.g., "1. Fork"), but this formatting should be consistent throughout both the "Development" and "Contributing" sections.

Copilot uses AI. Check for mistakes.
```bash
npm install
```

2. **Build the project:**
```bash
npm run build
```

3. **Linting:**
```bash
npm run lint
```

4. **Formatting:**
```bash
npm run format
```

5. **Run Tests:**
```bash
npm test
```

## Contributing

Contributions are welcome! Please fork the repository and submit a pull request.
1. Fork the repo.
2. Create your feature branch (`git checkout -b feature/amazing-feature`).
3. Commit your changes (`git commit -m 'Add some amazing feature'`).
4. Push to the branch (`git push origin feature/amazing-feature`).
5. Open a Pull Request.

## License
MIT

MIT © [0x3EF8](https://github.com/0x3EF8)