Opengraph and Twitter cards markup for a topic

Hi,

As it is my first topic on that forum, I just want to say thank you for the great product. We in CUBA Platform really love it :slightly_smiling_face:

We make announcements of new features on the forum to give an opportunity to the community to give their feedback on the spot. When I include the link to Discourse topic on Twitter the image is always our logo. Unfortunately, I can’t edit the snippet generated by Twitter, which is luckily not the case for Facebook. As a result, we have lots of tweets with logo, for instance, that one. On Facebook, it looks like that.

I looked through the preferences of our forum and found only fields for the twitter markup for all the pages. So, can I somehow change the twitter card markup for the specified topic?

2 Likes

I believe it should default to the first big image in the post you link to, with fallback to twitter summary large image url.

1 Like

Is there a way not to include the image in the post but to set it in twitter:image tag?

A custom image only for the post, that isn’t in the post? No that’s not possible.

3 Likes

Not being able to customize tweet:card setting for a thread is disappointing. If we tweet a thread, it often ends up with a user’s avatar as the image, and more often than not the initial text in the thread does not promote the thread very effectively. The ability to create a Summary Card with Large Image would be a huge positive. I know this thread is old, but I can’t find anything else on the topic, which surprises me because promoting a site on Twitter is such a great way to attract new members and Tweets with custom cards have much higher engagement.

Right now before I tweet I have to edit an OP to insert an image I like and write an introduction, tweet it so it load the image and text I want, and then revert my edits to restore the topic to it’s original state. If I want to tweet that thread again next week, I have to do this all over again.

This is all well beyond my technical ability so I have no idea what’s involved, but, for example, on WordPress, every SEO plugin lets you set a custom twitter card and opengraph for each post. A similar option on Discourse would be really appreciated.

3 Likes

Why revert? If it is better after the edit, then the edit should remain.

Users don’t want an admin coming in and changing their posts. It’s more important to provide a positive user experience than to edit content to make it tweet better. There are lots of work arounds such as changing OP each time you weet, or asking for consent to permanently change a post, or adding a post in the middle of the thread and tweeting that post (twitter will pick up the text and image from the post but the link will take the user to the middle of the thread, which is not a good user experience). These are all inferior to something that allows customization of a the twitter card on a thread-by-thread basis.

Also, afaik, there is no way to enable <meta name="twitter:card" content="summary_large_image"> for a thread instead of <meta name="twitter:card" content="summary" />.

2 Likes