1.6.0 • Published 2 years ago

@rimiti/facebook-automation v1.6.0

Weekly downloads
273
License
GPL-3.0
Repository
-
Last release
2 years ago

facebook-automation

Dependencies License PRs Welcome

Description

This repository provides a powerful way to post on your Facebook Page without using any API (based on Playwright).

Install

yarn add @rimiti/facebook-automation

Example

import { FacebookAutomation } from '@rimiti/facebook-automation';

const facebookAutomation: FacebookAutomation = new FacebookAutomation({
  credentials: {
    login: 'facebook@dimsolution.com',
    password: '$secr€t',
  },
  pageUrl: 'https://www.facebook.com/my-page-id',
  browserConfiguration: { // Optional
    headless: false, 
    args: ['--no-sandbox']
  } 
});

await facebookAutomation.post({
  text: 'Hello world',
  imagePath: './example.jpg',
});

Default browser configuration

The below default browser configuration can be overridden through browserConfiguration constructor attribute.

{
  headless: true,
  slowMo: 50,
}

Limitation

  • To avoid scrappers (not only), Facebook isn't using "id" elements. It's why some of elements are selected from "text content". Your Facebook account must be in English.

Scripts

Run using yarn run <script> command.

clean       - Remove temporarily folders.
build       - Compile source files.
build:watch - Interactive watch mode, compile sources on change.
lint        - Lint source files.
lint:fix    - Fix lint source files.
test        - Runs all tests with coverage.
test:watch  - Interactive watch mode, runs tests on change.

License

GPL-3.0 © Dimitri DO BAIRRO

1.6.0

2 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago