{% extends 'base.html' %}{% block content %}
LIVE CONNECTION CONFIGURATION

Facebook & listing collector

{% include 'admin_nav.html' %}

Facebook Page Login

Create a Meta app and configure Facebook Login and the Page permissions. Use the supported Graph API version shown in your Meta app dashboard.

{% for k,label in [('facebook_app_id','Facebook App ID'),('facebook_version','Graph API version (vNN.N)'),('public_url','Portal HTTPS origin')] %}
{% endfor %}

OAuth redirect: {{config['public_url'] or 'https://YOUR-SUBDOMAIN'}}/facebook/callback
Deauthorization callback: {{config['public_url'] or 'https://YOUR-SUBDOMAIN'}}/facebook/deauthorize
Data deletion callback: {{config['public_url'] or 'https://YOUR-SUBDOMAIN'}}/facebook/delete-data

Location-based listing API collector

Connect a vehicle-data provider you are authorized to use. This adapter sends HTTPS GET requests per interest. It does not turn Facebook Page permissions into Marketplace search permissions.

{% for k,label in [('collector_url','Provider HTTPS search endpoint'),('collector_source','Source label'),('collector_interval','Collection interval (seconds, minimum 60)'),('collector_queries','Interests queried per batch (1–10)'),('collector_auth_header','API credential header'),('collector_auth_prefix','Credential prefix (Bearer + space, or empty)')] %}
{% endfor %}

Supported placeholders: {make} {model} {lat} {lon} {radius} {max_price} {max_mileage} {min_year}. Radius is in miles; configure parameter names and units to match your provider. Add a literal limit parameter if needed. A batch processes one response page per interest.

Required fields: source_id, make, model, year, price, mileage, city, lat, lon, seller. Optional: title, url. Map structured numeric price/mileage/coordinates; formatted currency strings need a provider-normalized field.

Secrets are encrypted and never displayed after saving. Changing this form needs no source edits.

Collector status

Last run (Unix timestamp): {{state['last_run']}}
Latest batch: {{state['processed']}} listings · {{state['alerts']}} new alerts
{{state['last_error'] or 'No recorded errors.'}}

Automatic operation requires the background worker or a cron job running on your host.

Recent collection runs

{% for run in runs %}
{{run['status']}} · {{run['started']}}

{{run['processed']}} listings · {{run['alerts']}} alerts
{{run['message']}}

{% else %}

No runs yet.

{% endfor %}{% endblock %}