Files
muninn/sidecars/linkedin-post/README.md
T
m105 44f979820f Add Twitter and LinkedIn publishers with Playwright sidecars
- Create twitter-post sidecar with Playwright for browser automation
- Create linkedin-post sidecar with Playwright for browser automation
- Add TwitterPublisher class that calls twitter-post sidecar
- Add LinkedInPublisher class that calls linkedin-post sidecar
- Register both publishers in PublisherManager via AppServiceProvider
- Update Posts index view to show Publish button for twitter/linkedin types

Both publishers use the same pattern as RedditPublisher:
- No API keys required (uses stored credentials from Social Accounts)
- Browser automation via Playwright
- Returns JSON result with success/failure and URL

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
2026-07-27 21:08:39 +03:00

1.1 KiB

LinkedIn Post Sidecar

A Playwright acceptance test that logs into LinkedIn with supplied credentials and creates a post.

One-time setup

cd sidecars/linkedin-post
npm install
npx playwright install chromium

Usage

./run.sh --email=YOUR_EMAIL --password=YOUR_PASSWORD \
  --post="Your post content here" [--headed]

Prints a single JSON line to stdout and exits 0 on success, exits 1 on failure:

{"success": true, "url": "https://www.linkedin.com/posts/..."}
{"success": false, "error": "Login failed: Invalid credentials"}

Notes

  • On a failed run, Playwright retains a screenshot and trace under test-results/ for debugging. These are gitignored and not committed, but they persist on disk.
  • LinkedIn's UI changes periodically. If posting fails, check the selectors in tests/linkedin-post.spec.js and update them using: npx playwright codegen https://www.linkedin.com/login
  • LinkedIn may show CAPTCHAs or 2FA prompts which will cause the automation to fail.
  • For company pages, you may need to switch to the page after login before posting.