Skip to content

Facebook

Mode: 🔐 Browser · Domain: facebook.com

Commands

CommandDescription
opencli facebook profileGet user/page profile info
opencli facebook notificationsGet recent notifications with unread / time / url / notif_id / notif_type
opencli facebook feedGet news feed posts
opencli facebook searchSearch people, pages, posts
opencli facebook marketplace-listingsList your Marketplace seller listings
opencli facebook marketplace-inboxList recent Marketplace buyer/seller conversations

Usage Examples

bash
# View a profile
opencli facebook profile zuck

# Get notifications (default 15, max 100)
opencli facebook notifications --limit 10

# News feed
opencli facebook feed --limit 5

# Search
opencli facebook search "OpenAI" --limit 5

# Marketplace seller listings and inbox
opencli facebook marketplace-listings --limit 10
opencli facebook marketplace-inbox --limit 10

# JSON output
opencli facebook profile zuck -f json

Output

notifications

ColumnTypeNotes
indexint1-based row number across the returned page
unreadboolDerived from the explicit <div>未读</div> / <div>Unread</div> badge child; falls back to the anchor text prefix
textstringNotification body text. Read first from the per-row "Mark as read" button's aria-label (with the locale prefix stripped) so it does not include the unread badge or trailing time. Full body, no silent truncation
timestring | nullTime-ago label from the row's <abbr>, e.g. 2天 / 5 hrs. null when the abbr is missing — never the legacy '-' sentinel
urlstringFull notification anchor href, including notif_id / notif_t query params, so callers can follow up
notif_idstring | nullnotif_id query param parsed from url; null when absent
notif_typestring | nullnotif_t query param (e.g. onthisday, approve_from_another_device, group_recommendation); null when absent

--limit accepts a positive integer in [1, 100]. Out-of-range or non-numeric input raises ArgumentError upfront — no silent clamp.

If Facebook redirects to a login/checkpoint path (for example /login.php, /login/identify/, or /checkpoint/; session expired) the command raises AuthRequiredError. An empty notification list after a successful auth check raises EmptyResultError instead of a silent [].

Prerequisites

Released under the Apache-2.0 License.