Connecting Facebook with a Meta app
About 10 minutes, done once per machine. You need a Facebook account that is an admin of the Page you want to post to.
What is actually happening here
Posts go straight from your machine to Facebook, through your own Meta app. The App Secret stays on your machine and is not sent anywhere else.
The address autoreelvn.com/facebook/callback/ is only a static page Facebook sends the browser back to. It does not receive, store or forward your login code — you copy the address from it yourself, paste it into the app, and the app exchanges the code locally.
Step 1 — Create a Meta app
-
Open the app dashboard
Go to developers.facebook.com/apps and sign in with your Facebook account. -
Create the app
Press Create app, choose the type Other (some interfaces call it Business), give it any name —AutoReel của <your name>will do — and press Create app. -
Note the App ID and App Secret
Go to App Settings → Basic. App ID is a number. App Secret is a long string of letters and digits, and you have to press Show to see it.
Step 2 — Add Facebook Login
Meta has two interface layouts; look at the left sidebar to see which one you have.
| Sidebar says | What to do |
|---|---|
| Use cases | Press Add use case and choose the one containing Facebook Login |
| Products | Press + Add Product, find Facebook Login, press Set up, choose the Web platform |
Step 3 — Enable three permissions
In Use cases (or in Facebook Login on the older layout): open the Page-management use case — Manage everything on your Page → Customize → Permissions and features. Press Add for all three below, until each reads Ready for testing.
| Permission | What it is for |
|---|---|
pages_show_list | Reading the list of Pages you manage |
pages_read_engagement | Reading a Page's details |
pages_manage_posts | Posting video to a Page |
Step 4 — Register the redirect address
Two places, and both have to be saved.
-
Facebook Login → Settings
Set Client OAuth Login to Yes and Web OAuth Login to Yes, then paste exactly this string into Valid OAuth Redirect URIs. Press Save Changes at the bottom right.https://autoreelvn.com/facebook/callback/ -
App Settings → Basic
Set App Domains toautoreelvn.com— the bare domain, with nohttps://, no slash and no path. Set Privacy Policy URL tohttps://autoreelvn.com/privacy/(required before the app can go Live). Press Save Changes.
autoreelvn.com. If it is gone, it was not saved — do it again, and press Enter to make the chip first.Step 5 — Connect it to the app
-
Paste the App ID and App Secret
Open the app, go to Cấu hình (Settings), find the Khoá khác (other keys) block, paste FACEBOOK APP ID and FACEBOOK APP SECRET, then press lưu (save). -
Press Connect Facebook
Go to the Facebook screen and press Connect Facebook. Your browser opens Facebook's login page. -
Sign in and grant
Sign in, choose the Page you want to post to, and agree to the permissions. -
Copy the address you came back to
The browser stops at autoreelvn.com/facebook/callback/. Press Copy, or copy the whole address out of the address bar. -
Paste it back into the app
Back in the app, open "Nếu đăng nhập không tự quay về" ("if the login did not come back by itself"), paste into "Địa chỉ, hoặc chỉ mã", and press Hoàn tất kết nối. -
Tick the Pages
The list of Pages appears. Tick the ones you want to post to — with nothing ticked, a job has no destination.
Making the posts public
A Meta app starts in Development mode: posts do go up, but only accounts with a role on the app can see them. To make them public, fill in the Privacy Policy URL from step 4, then flip the App Mode switch at the top of the dashboard to Live.
http://localhost is no longer accepted by Meta. If you set FB_REDIRECT_URI in .env, leave it as it is.| Limit | The number |
|---|---|
| Reels per Page per day | 30 in 24 hours — past that Facebook refuses, and it is not the app's error |
| User token lifetime | About 60 days — when it lapses, press Connect again; nothing is lost |