Twitter Lead Generation Cards are a way to let Twitter users sign up for more information about a product. Twitter users click a button to indicate their interest in something which causes a server-to-server request to an endpoint to store that information.

This module provides an endpoint that can handle those server-to-server requests.

Features:

  • By default all leads are stored in a new database table, twcards_leads
  • A hook is also fired so that custom code can be used to do extra work
  • Twitter can optionally sign requests with a shared-secret salt, this module will validate that token so you know leads are really from twitter (and not from illegitimate bots/hackers)
  • A drush hook will clear out the values during a sanitize operation to prevent accidentally leaking the data
  • Twitter prefers to POST requests, but can also send GETs. If you have problems with POSTs for some reason you can optionally enable GET requests (defaults to off)
  • An admin interface exists to see the 10 most recent leads
  • Twitter allows the addition of hidden static fields on a per-card basis (e.g. to indicate which card its associated with, or related marketing information). This module will store any additional data like that into a json_encoded field in the database.

For more documentation on how these Lead Generation cards work, see:

Note about "Twitter Cards"

While this module is about handling data from "Twitter cards" it does not provide the <meta> tags to serve up Twitter Cards. For that you should use the very fine Metatag module.

Supporting organizations: 
Development and maintenance

Project information

Downloads