Hi,

in v3 there are two changes related to generating previews for tweets with cards:

  • card_id parameter has been removed from the GET accounts/:account_id/tweet/preview endpoint,
  • card property preview_url has been replaced with card_uri.

In v2 we could insert preview_url into the tweet text to generate previews for tweets with cards. In v3 we can find no way to generate such previews.

Many thanks in advance,
Dejan

Thanks for the question, @dejan. You are correct on both points. We have moved toward card_uri as the way to associate cards with Tweets.

The suggested way to preview is to create a draft and then preview the draft. The service powering those preview endpoints does support card_uri.

  1. Create a draft using POST accounts/:account_id/draft_tweets
  2. Preview the draft using GET accounts/:account_id/draft_tweets/preview/:draft_tweet_id

See the announcement for more details.

Thanks for the answer @juanshishido. We have considered generating tweet previews through
GET accounts/:account_id/draft_tweets/preview/:draft_tweet_id endpoint.

In the meantime we discovered that it is possible to generate previews with cards on
GET accounts/:account_id/tweet/preview endpoint if we add card_uri parameter to the call.
This parameter is not listed in the documentation for this endpoint, however this works for image type cards while it doesn’t work for video type cards.

My question is: Is this just temporary(possible bug) or are you implementing car_uri parameter on this endpoint because we would very much prefer generating previews on this endpoint instead of creating tweet drafts and then generating preview through them.

1 Like

Thanks, @dejan! That parameter is not fully supported on the GET accounts/:account_id/tweet/preview endpoint. There are some rendering issues even for image cards.