Give this deployment a Meta app
Signing in with Facebook needs an app of your own — Facebook will not let one account's app act for another. It is a one-time setup, and afterwards there is nothing to paste ever again: you sign in, pick your Page, and that is the whole configuration.
Create the app
Five minutes at developers.facebook.com. Nothing is submitted for review — a development-mode app can already act for its own admins, which is you.
- Open developers.facebook.com/apps → Create app. Give it a name and a contact email.
- On the Use cases screen pick Other, then on the next screen pick the app type Business. Not "Manage everything on your Page", tempting as it sounds. That use case wires up Facebook Login for Business, which is a different OAuth flow from the one this app speaks. Pick Other → Business and you get plain Facebook Login, which is what works here.
- A business portfolio is optional at this point. Skip it unless Meta insists.
- In the app, Add product → Facebook Login → Set up. Again: the plain one, not "for Business". If it asks for a platform, choose Web.
-
Go to Facebook Login → Settings. Paste this into
Valid OAuth Redirect URIs and save. It must match character for character,
including
httpsand the path — this is the step that most often goes wrong.On the same screen, leave Client OAuth login and Web OAuth login switched on. They are on by default; if either is off, sign-in fails with a URL-blocked error.… -
Leave the app in Development mode. This is the part that saves you weeks:
a development-mode app can use permissions like
pages_manage_postsstraight away, but only for people listed on it. You are its admin, so that is you. Going Live is what would require App Review, and you do not need it to post to your own Page. Anyone else who should sign in has to be added under App roles → Roles as an admin, developer or tester first.
Tell this deployment about it
The App ID and App secret go straight from your terminal into Vercel. Neither is ever displayed, written into the repo, or pasted into a chat.
From App settings → Basic, copy the App ID and App secret. Then, in
the vom-flow folder:
./setup-env.shSign in and claim it
The first Facebook account to sign in becomes this deployment's owner, and everyone else is refused. Make sure that is you.
When it does not work
Facebook's errors are terse. These four cover almost everything.
- URL Blocked: This redirect failed because the redirect URI is not white-listed
- The redirect URI in Facebook Login → Settings does not match exactly.
Check for a trailing slash,
httpinstead ofhttps, or awww.that is or is not there. Copy it from the box above rather than retyping it. - Invalid Scopes: pages_manage_posts
- The app does not have that permission attached yet. Open App settings → Use
cases → Other → Customize and add
pages_manage_posts,pages_show_listandpages_read_engagement. In development mode they need no review. - You signed in, but no Pages are listed
- The consent screen has a second step where you tick which Pages to grant. If it was skipped, or the Page was left unticked, the grant is empty. Sign out, sign in again, and tick the Page. If it still shows nothing, you are a Page moderator rather than an admin — only admins can grant posting.
- App Not Setup / this app is in development mode
- The Facebook account you signed in with is not on the app. Add it under App roles → Roles, or sign in with the account that created the app.
Storage matters as much as the app: without one, a sign-in and any connected Page vanish the next time the server goes cold. See Storage in the README.