Authentication
Connect Facebook and Instagram
sfeed auth facebook This opens your browser. You log in to Facebook, approve the permissions, and sfeed stores the tokens locally. That's it.
Instagram is connected automatically if your Facebook Page is linked to an Instagram Business or Creator account.
What happens behind the scenes
- sfeed starts a local server on port 8739
- Your browser opens
auth.sfeed.dev/fb/authorize - The auth proxy redirects to Facebook's OAuth consent screen
- You approve. Facebook redirects back to the auth proxy with a code.
- The proxy exchanges the code for tokens (using the app secret)
- Tokens are stored in Cloudflare D1 (for cloud scheduling) and sent to your local machine
- Your local machine stores them in
~/.sfeed/tokens.json
Check connection status
sfeed auth status Shows which platforms are connected and which account they're linked to.
Disconnect
sfeed auth revoke facebook Removes stored tokens from your local machine. Note: tokens stored on the server for cloud scheduling are retained until they expire naturally.
Requirements
- Facebook Page -- the API posts to Pages, not personal profiles. If you don't have a Page, create one at facebook.com/pages/create.
- Instagram Business/Creator account -- for Instagram posting, your IG account must be a Business or Creator account linked to a Facebook Page. Convert in Instagram Settings > Account > Switch to Professional Account.