WebsiteCard not showing up in Tweet


#1

Hello,

We’re having issues where assigning a card to a Tweet does not show the actual card in the tweet itself, but it does in the preview.

How we create the card:

website_card = WebsiteCard(account)
website_card.website_url = ad['link']
website_card.website_title = ad['title']
website_card.image_media_id = ad['twitter_media_id']
website_card.name = ad['title']['value']
website_card.save()

Then to generate a preview, straight from the documentation:

Tweet.preview(account, status='Hello @AdsAPI!', card_id=website_card.id)

Which actually shows the card. But as soon as we create the tweet:

Tweet.create(account, status='Hello @AdsAPI!', card_id=website_card.id)

And look it up by ID, we see that the card is not showing:

https://twitter.com/adgojapan/status/826723336130486273

Is there anything we’re doing wrong here? For reference here is the card id: 38s4h


#2

Hey Brian,

This is a pretty common and admittedly confusing part of setting up cards - you need to include the URL in the tweet status text, there’s a post that summarizes the steps in this thread: How to associate a card to a tweets

We’ll see if we can make it clearer in the documentation as the documentation is overhauled over the upcoming months.

Thanks,

John


#3

Thanks Jon!

We’ll give it a shot, and report back.


#4

Hey John,

Quick comment to let you know it worked! Thanks!

Brian