Lead Gen Campaign


#1

I would like to create a Lead Card, create line item for this, create target and promote this lead card.

Is it possible to do via Twitter API? if so can you please list down the apis

Thanks.


#2

Hi @Vinoth! It’s the Ads API. Please read the docs, it’s all in there: https://dev.twitter.com/ads/overview. Creating the campaign, creating the line item, adding targeting options to the line item, creating the lead generation card, a promoted-only tweet and and ad.


#3

Hi @majoritasdev

Thanks for the reply.

I able to create a tweet and promote via Twitter API as per the document.
Steps involved:

  1. Created the line item and get the line item_id.
  2. Created the tweet and get the twee_id
  3. Created the promotion via Promote APIusing line_item_id, tweet_id.

Similarly, i would like to promote the lead gen card.

As of now i able to

  1. Uploaded the image via media API (POST /1.1/media/upload.json)
  2. Created Lead Card using LeadCard API.

Now how can i link this lead card id Promote api for promotion? or how we can promote this lead card?

Please clarify.

Thanks.


#4

Hi, @Vinoth! You’re looking for Advice for Associating a Website Card with a Campaign or with Tweets? :slight_smile:
So what you need to do is create the lead gen card before you create the tweet, and when you create the tweet you must append the card’s preview_url to the tweet’s status, or use the card’s id, like this:

$tweetStatus = trim($tweetBody) . ' https://cards.twitter.com/cards/' . $twitterAccountId . '/' . $leadGenCardId;

#5

Hi @Majoritasdev,

Thanks for the information. It works.


#6