HTML Returned for an Ad Tweet Preview Does Not Look Right

tweet-preview
cards

#1

When previewing a Tweet on ads.twitter.com the preview looks correct
https://www.dropbox.com/s/d1b8550lkc9jvgm/Screenshot%202015-08-14%2014.19.05.png?dl=0

But when we use the html returned via the preview api endpoint:
https://dev.twitter.com/ads/reference/get/accounts/%3Aaccount_id/tweet/preview/%3Atweet_id

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
#2

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


#3

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?


#4

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?


#5

@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="https://ton.twimg.com/macaw-campaigns/css/tweet_preview.bundle.xxxx.css" 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.


#6

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!


#7

@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.


#8

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