HTML Returned for an Ad Tweet Preview Does Not Look Right



When previewing a Tweet on the preview looks correct

But when we use the html returned via the preview api endpoint:

It looks like unstyled plain html and shows the wrong button CTA:

I think a lot of our customers may cancel their ads after seeing an inaccurate preview as it is seen in the html api response.

Are we missing something, or this expected?

Twitter card preview problem

Hey @sealabcore - could you please provide us with a twurl request showcasing this issue so we can recreate it locally and investigate further?


twurl “/accounts/r4gegb/tweet/preview/632297560070189056”

preview from response has wrong buttons and seemingly no style as shown in above previews. Do I need to include some css or something?


You shouldn’t need to add anything more, you should be getting a fully-fledged HTML response that you can simply drop inside an iframe. Could you share the response you are getting from the API please?


@sealabcore please make sure to follow our community guidelines for reporting issues. We’re not able to reproduce the problem you’re seeing since you haven’t provided full HTTP request and response information or twurl examples. Without that we can’t confirm if you are seeing malformed Tweet preview responses of if this is just a network issue localized to you.

To answer you question, there are no additional styles you need to include but it is possible you’re not able to download the style sheets the Tweet Preview content references.

In the Tweet preview markup you’ll see references like this:

<link href="" rel="stylesheet" />

If you’re unable successfully download that file in your browser, then yes you will be seeing unstyled previews. Please ensure you’re successfully able to download these CSS files form Twitter’s CDN and if not provide API responses so we can figure out what the issue is.


Hi @brandonmblack

Sorry about not following the guideines. I have fixed the css issues. I was loading the frame wrong :frowning:

Though the API response still has the wrong CTA button:

Here’s the api response showing our ads actual CTA value:

Do you need any more info from me?

Thanks guys!


@sealabcore thanks for the quick follow up! Really appreciate the full response / extra detail. This definitely looks like a defect on our end re: wrong CTA. Let me follow up and I’ll post back here when I have more info.


@sealabcore apologies for the late followup, but we deployed a fix for this issue last week. This should be resolved now.