Support for Twitter Cards with large images?

(Daniel Marquard) #1

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?

(Jeff Atwood) #2

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

(Daniel Marquard) #3

Sorry, I meant for Twitter Cards in tweets.

Example with Summary Card (Discourse default): Crit Cola on Twitter: "New #Overwatch voice lines imply HUGE changes are coming, including new map modes."
Example with Summary Card with Large Image: Recode on Twitter: "Snapchat has hired Morgan Stanley to raise debt financing."

(Jay Pfaffman) #4

I wanted to see what the one box displays look like

Example with Summary Card (Discourse default):

Example with Summary Card with Large Image:

(Rafael dos Santos Silva) #5

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.

(Arpit Jalan) #6

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

Will try to get it done by early next week.

(Daniel Marquard) #7

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

Fantastic. Thanks!

(Arpit Jalan) #8

This is now done:

Let’s continue this discussion on above linked topic.

(Arpit Jalan) closed #9