Marcus finishes facebook autoposter frontend#4714
Marcus finishes facebook autoposter frontend#4714marcusyi1 wants to merge 16 commits intodevelopmentfrom
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Anusha-Gali
left a comment
There was a problem hiding this comment.
Hi Marcus,
I tried to review your PR but am unable to do so since i could not figure out few things required for the setup. If you could provide a video of setup it would be helpful.
Coming to where i am stuck, i did create a developer login and an app and did select the "Facebook login for business" but it says the below:
Facebook Login for Business requires advanced access
Your app has standard access to public_profile. To use Facebook Login for Business, switch public_profile to advanced access.
Now i did try to get advance access but it says "Verification required" and i am unable to understand what exactly am i to fill in that page, even upon adding details i could think of and saving, no luck. Also i then tried to make the app live but it stops saying i should provide a privacy policy but i am not confident as to what it is i am supposed to enter.
|
Hi @marcusyi1 |
Anusha-Gali
left a comment
There was a problem hiding this comment.
Hi Marcus,
I tried to review and setup following the steps you mentioned and have tried to do a facebook post. bUt i am unable to view it anywhere. Below are the screenshots showing my console log, and graph link: https://graph.facebook.com/v19.0/944703262049095/feed , and the history as well as setting at my end. Let me know if i am going wrong anywhere.
|
Hi @marcusyi1 Once I disconnnect I am not able to re-connect. I get the below error. Do you think history shown should be particular to me ? Even though I am connected, I see facebook not connected message on top The scheduled post did not work. This may be because the I disconnected the app before. But cannot test again since app is not reconnecting. Also, could we remove the following statement from the PR description?(Step2) - |
| @@ -1,55 +1,494 @@ | |||
| import React, { useState } from 'react'; | |||
There was a problem hiding this comment.
React is imported twice with overlapping bindings (React/useState) which would cause a compile error.
|
|
||
| const tabOrder = [ | ||
| { id: 'composer', label: '📝 Make Post' }, | ||
| { id: 'scheduled', label: '⏰ Scheduled Post' }, |
There was a problem hiding this comment.
duplicate ids will cause weird ui and state bugs
|









Description
This PR implements a comprehensive Facebook Pages auto-poster system for HGN, building upon and modernizing the foundational work completed in PR3270/PR1268 (basic posting) and PR3466/PR1359 (scheduling framework) by Snehal Patare.
Key capabilities:
This implementation uses modern OAuth patterns instead of hardcoded tokens, provides comprehensive error handling with user-friendly messaging, and includes permission-based access control using HGN's existing requestor system.
Fixes: High Priority Task - "Create appropriate auto-poster for Facebook + Facebook Groups" (Jae) - Facebook Pages component
Related PRs (if any):
Builds upon (already merged or pending approval):
Do git checkout of https://github.com/OneCommunityGlobal/HGNRest/pull/2005/ in order to test this PR
Main changes explained:
New Files:
Updated Files:
Environment Variables Added:
REACT_APP_FACEBOOK_APP_ID- Your Facebook App ID (must match backendFACEBOOK_APP_ID)How to test:
Prerequisites
Step 1: Create a Facebook Developer Account
Step 2: Create a New App
HGN Facebook Test - [YourName]Step 3: Add Facebook Login Product
https://localhost:3000as the Site URL → Click Save → ContinueStep 4: Configure OAuth Settings
https://localhost:3000localhostStep 5: Get Your App Credentials
Step 6: Configure Environment Variables
Frontend (.env):
Backend (.env):
Step 7: Enable HTTPS for Local Development
Facebook OAuth requires HTTPS. If using Vite:
npm install -D @vitejs/plugin-basic-sslvite.config.js:Step 8: Run and Test
npm installandnpm run start:localVerification Checklist
Troubleshooting
"Facebook Login for Business requires advanced access"
You selected the wrong product. Remove "Facebook Login for Business" and add regular "Facebook Login" instead.
"App must be Live to use this feature"
Stay in Development Mode. You don't need to make the app Live for testing. The app creator can test all features in dev mode.
"No Facebook Pages found"
Make sure you have admin access to at least one Facebook Page. Create a test page at [facebook.com/pages/create](https://www.facebook.com/pages/create).
OAuth popup blocked
Allow popups for localhost in your browser settings.
"Invalid redirect URI"
Ensure
https://localhost:3000is listed in Facebook Login → Settings → Valid OAuth Redirect URIs.Graph API Error Code 10 (Post History)
This occurs when reading posts from Facebook's API in development mode. This is expected - posting still works, but reading the feed is restricted. Post history will show posts from MongoDB successfully; the Facebook API source may show an error.
Screenshots or videos of changes: