I’m trying to connect Facebook Login / Facebook API with n8n, but I’m facing issues getting the correct Client ID (App ID) and Client Secret (App Secret) from Meta for Developers.
Hi @devcodejourneyy
I guess you have already tried using meta app with facebook business credentials to login, this might be a credential related problem but let’s consider OAuth scopes also pages_manage_metadata , and setting Redirect url given in the n8n credentials as is in the valid oauth redirect in the meta app and then try to switch to live and then connect facebook lead ads oath to n8n
go to your Meta Dashboard > Facebook Login > Settings. make sure the ‘Valid OAuth Redirect URIs’ box exactly matches https://n8.spagreen.net/rest/oauth2-credential/callback. if there’s even a single extra space or a trailing slash, Meta blocks it silently.
you don’t strictly need to switch to Live mode. but if your app is in Development mode, the personal Facebook account you are using to log in must be explicitly added as an Admin, Developer, or Tester under the App Roles section in Meta.
go to business.facebook.com > Integrations > Leads Access. you have to explicitly assign your Meta App and your Facebook profile permission to pull leads for that specific Page.
make sure your app is requesting pages_manage_metadata, pages_show_list, pages_read_engagement, and lead_retrieval.
what exactly happens when you click “Connect my account”? does a Facebook popup window crash with a specific error code, or does it just fail silently?
Hey, for Facebook Lead Ads to actually work you need to switch the app to Live mode, Meta blocks OAuth connections for apps still in Development unless the user is explicitly added as a tester/admin on the app. To go Live you’ll need to add a Privacy Policy URL in App Settings > Basic, then flip the toggle at the top of the dashboard. Also double check you have Advanced Access for public_profile under App Review > Permissions and Features, the basic access isn’t enough for the leads_retrieval stuff. One more thing — is your n8n instance publicly accessible over HTTPS? Meta won’t accept localhost or self-signed certs for the callback URL.