@extends('admin.adminLayout') @section('admin_page_title') Facebook Lead Ads Integration @endsection @section('admin_content')

Facebook Lead Ads Integration

Save Meta API settings in the database, connect Facebook, select Pages, Campaigns and Lead Forms, then receive leads automatically.

@if($settingsReady) Settings Ready @else Settings Incomplete @endif @if($webhookReady) Webhook Ready @endif @if($integration) Connected: {{ $integration->name }}
@csrf
@else Connect Facebook @endif
Facebook API Settings
These values are saved in the database table facebook_lead_settings, not in the .env file.
@csrf
@if(!empty($settings['app_secret'])) Secret already saved. Leave empty to keep it. @endif
Add this exact URL in Meta App → Facebook Login → Valid OAuth Redirect URIs.
Use this exact token when Meta asks for webhook verification.
Comma-separated permissions.
Webhook callback URL: {{ url('/webhooks/facebook/leadgen') }}
@if($integration)
1. Pages
2. Ad Accounts & Campaigns
3. Lead Forms
Select a campaign or page to load lead forms.
@else
First save Facebook API settings, then connect your Facebook account. After connection, the system will show Pages, Ad Accounts, Campaigns and Lead Forms.
@endif
@endsection