Skip to main content

reeln-cli plugin for Meta platform integration (Facebook Live, Instagram, Threads)

Project description

reeln-plugin-meta

A reeln-cli plugin for Meta platform integration (Facebook Live, Instagram, Threads).

Install

pip install reeln-plugin-meta

Or for development:

git clone https://github.com/StreamnDad/reeln-plugin-meta
cd reeln-plugin-meta
make dev-install

Features

  • Facebook Live Video — creates a live video on your Facebook Page during ON_GAME_INIT
  • Writes the livestream embed URL to context.shared["livestreams"]["meta"]
  • All features are opt-in via boolean feature flags (default false)

Facebook Developer Setup

1. Create a Facebook Developer Account

Go to developers.facebook.com and register as a developer.

2. Create an App

  1. Go to My AppsCreate App
  2. Select a use case (e.g. OtherBusiness)
  3. Choose Business app type
  4. Fill in app name, contact email, and select a Business portfolio
  5. Click Create App

3. Get a Page Access Token

  1. Go to the Graph API Explorer
  2. Select your app from the Meta App dropdown
  3. Click Generate Access Token
  4. Grant the following permissions:
    • pages_show_list
    • pages_manage_posts
    • pages_read_engagement
    • publish_video
  5. Select your Page from the User or Page dropdown
  6. Copy the Page Access Token

Note: The default token expires in ~1 hour. For a long-lived token (60 days), exchange it via the Access Token Debugger or the token exchange endpoint:

GET /oauth/access_token?grant_type=fb_exchange_token
  &client_id=APP_ID&client_secret=APP_SECRET
  &fb_exchange_token=SHORT_LIVED_TOKEN

4. Save the Token to a File

mkdir -p secrets
echo "YOUR_PAGE_ACCESS_TOKEN" > secrets/meta_page_token.txt

5. Get Your Page ID

Find your Page ID in Page Settings → About → Page ID, or query it via the API:

curl "https://graph.facebook.com/v24.0/me?access_token=YOUR_TOKEN"

6. Configure the Plugin

reeln config set meta.page_access_token_file ./secrets/meta_page_token.txt
reeln config set meta.page_id YOUR_PAGE_ID
reeln config set meta.create_livestream true

Or edit your reeln config JSON directly:

{
  "plugins": {
    "enabled": ["meta"],
    "settings": {
      "meta": {
        "page_access_token_file": "./secrets/meta_page_token.txt",
        "page_id": "123456789",
        "create_livestream": true
      }
    }
  }
}

7. App Review

The publish_video permission may require App Review for production use. During development, you can use the token with your own Pages without review.

Configuration

Feature Flags

Each capability is gated behind a boolean flag (default false):

Field Default Description
create_livestream false Enable Facebook Live Video creation on ON_GAME_INIT
dry_run false Log API calls without executing them

Required Settings

Field Type Description
page_access_token_file str Path to Facebook Page access token file
page_id str Facebook Page ID

Livestream Settings

Field Type Default Description
graph_api_version str v24.0 Graph API version
status str LIVE_NOW Broadcast status (LIVE_NOW or UNPUBLISHED)
privacy str EVERYONE Privacy setting (EVERYONE or SELF)
content_category str SPORTS Content category (SPORTS, VIDEO_GAMING, etc.)
game_id str "" Facebook game ID to tag the broadcast with
save_vod bool true Save a VOD recording after broadcast ends
published bool true Publish VOD to Page timeline after broadcast ends
stop_on_delete_stream bool false Auto-end broadcast when RTMP stream disconnects

All settings can be overridden per named profile. For example, a config.testing.json profile could set "privacy": "SELF" for test broadcasts while your default config stays "EVERYONE" for game day.

Development

make dev-install      # uv venv + editable install with dev deps
make reeln-install    # install into sibling reeln-cli venv
make test             # pytest with 100% coverage
make lint             # ruff check
make format           # ruff format
make check            # lint + mypy + test

License

AGPL-3.0-only

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reeln_plugin_meta-0.5.0.tar.gz (43.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reeln_plugin_meta-0.5.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file reeln_plugin_meta-0.5.0.tar.gz.

File metadata

  • Download URL: reeln_plugin_meta-0.5.0.tar.gz
  • Upload date:
  • Size: 43.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for reeln_plugin_meta-0.5.0.tar.gz
Algorithm Hash digest
SHA256 6e546e28a3a27c4ae702bda6f84bbf529210582c1e07b5495e889dac3f745caa
MD5 ab74860bdc9aa30e87a0e97e02534faa
BLAKE2b-256 03c0e224ac8db2e9531df016c55ee32adbf89ea42aba0872ec877e465302fb67

See more details on using hashes here.

Provenance

The following attestation bundles were made for reeln_plugin_meta-0.5.0.tar.gz:

Publisher: release.yml on StreamnDad/reeln-plugin-meta

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file reeln_plugin_meta-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for reeln_plugin_meta-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 773b6c1441bd9d217043f474f8d6d410e70de9b5a0438b3691fa8753743b23a5
MD5 c233ef5f9da41b8b9f20cead9a4e1efa
BLAKE2b-256 24d829cfc844cd94bebe2edc1ad0c4f4fde22f58fa050c0d05fbf5162c60efac

See more details on using hashes here.

Provenance

The following attestation bundles were made for reeln_plugin_meta-0.5.0-py3-none-any.whl:

Publisher: release.yml on StreamnDad/reeln-plugin-meta

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page