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
- Go to My Apps → Create App
- Select a use case (e.g. Other → Business)
- Choose Business app type
- Fill in app name, contact email, and select a Business portfolio
- Click Create App
3. Get a Page Access Token
- Go to the Graph API Explorer
- Select your app from the Meta App dropdown
- Click Generate Access Token
- Grant the following permissions:
pages_show_listpages_manage_postspages_read_engagementpublish_video
- Select your Page from the User or Page dropdown
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reeln_plugin_meta-0.4.0.tar.gz.
File metadata
- Download URL: reeln_plugin_meta-0.4.0.tar.gz
- Upload date:
- Size: 42.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27b6832a183199aa2674fb946a1ff18260b4451f82225742b9be36810539dde7
|
|
| MD5 |
434dae70b54b2e64f52250f30863c5dc
|
|
| BLAKE2b-256 |
bf4be0a3d49fcd3b8db8aebdfc6c1cfa9181f7c248c418f463a605c869167b32
|
Provenance
The following attestation bundles were made for reeln_plugin_meta-0.4.0.tar.gz:
Publisher:
release.yml on StreamnDad/reeln-plugin-meta
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reeln_plugin_meta-0.4.0.tar.gz -
Subject digest:
27b6832a183199aa2674fb946a1ff18260b4451f82225742b9be36810539dde7 - Sigstore transparency entry: 1089846546
- Sigstore integration time:
-
Permalink:
StreamnDad/reeln-plugin-meta@4bb7ce26d3dcbd587128cd106c4a2b84ff903296 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/StreamnDad
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4bb7ce26d3dcbd587128cd106c4a2b84ff903296 -
Trigger Event:
push
-
Statement type:
File details
Details for the file reeln_plugin_meta-0.4.0-py3-none-any.whl.
File metadata
- Download URL: reeln_plugin_meta-0.4.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc7699933abcace0a68d4de382f40ead65e902dafdf6d739eb4d556f975fd3d8
|
|
| MD5 |
a48d9cb323693b2bd9da472e8a32f54e
|
|
| BLAKE2b-256 |
6533daddf4286826f85a60eafbc608a7f0e6fedc094a7fa3011bff441e5c5b46
|
Provenance
The following attestation bundles were made for reeln_plugin_meta-0.4.0-py3-none-any.whl:
Publisher:
release.yml on StreamnDad/reeln-plugin-meta
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
reeln_plugin_meta-0.4.0-py3-none-any.whl -
Subject digest:
cc7699933abcace0a68d4de382f40ead65e902dafdf6d739eb4d556f975fd3d8 - Sigstore transparency entry: 1089846568
- Sigstore integration time:
-
Permalink:
StreamnDad/reeln-plugin-meta@4bb7ce26d3dcbd587128cd106c4a2b84ff903296 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/StreamnDad
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4bb7ce26d3dcbd587128cd106c4a2b84ff903296 -
Trigger Event:
push
-
Statement type: