Support for Twitter Cards with large images?

Looking through Discourse’s code, it looks like only standard Twitter Summary Cards are supported. I’d prefer to use Summary Cards with large images, which is a simple change to make, but I’m not sure how to hook into that code in application_helper.rb, or if that’s even possible. Any ideas for changing this meta tag to allow for including large images on Twitter Cards?

A) this already works, just have to enter your twitter API key or it will not work

B) variable height stuff is not allowed in endless scrolling so whatever it is, we need to know its exact size to onebox it

Sorry, I meant for Twitter Cards in tweets.

Example with Summary Card (Discourse default): https://twitter.com/critcolaguild/status/775601821662474240
Example with Summary Card with Large Image: https://twitter.com/Recode/status/776274344578207744

1 Like

I wanted to see what the one box displays look like

Example with Summary Card (Discourse default):


Example with Summary Card with Large Image:

I think we should create a SiteSetting twitter card type that let’s you choose between:

  • Summary Card (current one)
  • Summary Card with Large Image
  • Photo Card

Those types can be supported just by adjusting the type, no extra markup.

3 Likes

Yes, this is on my to-do list. Relevant discussion here:

https://meta.discourse.org/t/facebook-opengraph-images-not-working-on-the-homepage/46086/20?u=techapj

Will try to get it done by early next week.

4 Likes

I don’t think Onebox parses the link cards either way.

Fantastic. Thanks!

1 Like

This is now done:

https://meta.discourse.org/t/facebook-opengraph-images-not-working-on-the-homepage/46086/22?u=techapj

Let’s continue this discussion on above linked topic.

3 Likes