Skip to main content

tungsten-meta-leads

Facebook and Instagram lead forms for Tungsten. New leads from your Meta lead ads land in tungsten-leads the moment someone submits a form.

What you get

  • One-click setup: press Connect Facebook, allow access, done. Your pages, their lead forms and the webhook are set up for you.
  • Every answer goes to the lead: name, email, phone, company, and your own questions as lead fields (created for you).
  • Per form: switch it on or off, choose the starting status and who the leads are assigned to, and change where each answer goes.
  • Sync reads recent leads from Meta, for leads sent while your site was down. The same lead is never added twice.
  • A Meta lead log shows every lead Meta sent and what happened to it, with Try again for failures.

Install

pip install tungsten-meta-leads
from tungsten_leads import LeadsPlugin
from tungsten_meta_leads import MetaLeadsPlugin

panel = Panel(..., app_url="https://admin.example.com")   # your public https address
panel.plugin(LeadsPlugin())
panel.plugin(MetaLeadsPlugin())
panel.create_tables(engine)

Setup (once)

Open Facebook & Instagram in your panel and press Setup guide. It walks through every click, with your own addresses filled in. In short:

  1. At developers.facebook.com, create an app with the use case Capture & manage ad leads with Marketing API, and add the pages_manage_metadata permission to it.
  2. Paste the app's App ID and App secret on the setup page.
  3. In the app's Facebook Login for Business, Settings, add the Redirect URI shown on the setup page (for example https://admin.example.com/admin/meta/callback).
  4. Publish the app (Publish, Go live). Meta sends no leads, not even test leads, to an app that is not live.
  5. Press Connect Facebook and allow every Page and permission.

Your site must be reachable on the internet over https so Meta can send leads to it. For your own Pages you usually don't need App Review; it is needed when other businesses connect their Pages to your app. The full guide, with common problems, is in Facebook & Instagram leads.

You can also give the keys in code: MetaLeadsPlugin(app_id="...", app_secret="...").

Where answers go

Each form has a map from Meta question to lead field. The targets are name, first_name, last_name, email, phone, company, notes, or the key of a lead field. Leave a target empty to skip that answer. Standard questions (full name, email, phone, company) are mapped for you.

Metadata

Release files for tungsten-meta-leads 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tungsten-meta-leads 0.1.0
File Size Uploaded
tungsten_meta_leads-0.1.0.tar.gz 22.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tungsten-meta-leads 0.1.0
File Interpreter ABI Platform
tungsten_meta_leads-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 45.7 kB

Release files / tungsten_meta_leads-0.1.0.tar.gz

Download URL tungsten_meta_leads-0.1.0.tar.gz
Size 22.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9c374db78b16724353a1c759a562c3278e3aad1aa180fe7866ccac23a71bfc8e
BLAKE2b-256 checksum
How to use checksums
39c0ec043dce6257c802bae511db0a7bda483e8b371f006dde29f364d6024292
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release files / tungsten_meta_leads-0.1.0-py3-none-any.whl

Download URL tungsten_meta_leads-0.1.0-py3-none-any.whl
Size 23.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a703a3617a1f76f0727681a88d98092c1c2ff3b57ba07189a79f57e3a9fd8d0c
BLAKE2b-256 checksum
How to use checksums
39bc999a50ebea5ebfa9c032013dd990a4b0f5d64332932ef79b824151816727
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release history Release notifications | RSS feed

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page