Link Discourse with a Twitter account (Adding Twitter card and via attribute)

AI 生成的摘要

The discussion revolves around linking a Discourse install with a Twitter account to enhance Twitter sharing features. CamilleRoux initially proposed adding a Twitter account field in admin to display a nice Twitter card for subjects. CamilleRoux further clarified the idea, sharing a screenshot of the current Twitter card validator result.

codinghorror mentioned that official Twitter embeds with variable sizes cause problems in Discourse’s rendering strategy. However, David_Baker1 brought up a different use case, where including the Twitter handle in the Discourse profile would allow for automatic ‘via @myaccount’ attribution when sharing posts on Twitter.

David_Baker1 expressed interest in hearing from CamilleRoux again to pursue the idea, while ChristopherMcEwan acknowledged the idea’s potential, wishing David_Baker1 good luck in pursuing it.

I think it could be great to be able to link an Discourse install with a Twitter account.

We could use it to:

This already happens, in fact you have to set up Twitter logins to get Twitter to embed at all… however, official Twitter embeds of variable size (height) cause huge problems in our rendering strategy within topics.

@techapj implemented this but it caused wild fluctuations in page rendering when a big, tall (but unknown in height until actually rendered) Twitter “official” embed appeared on the page. Like with, say, an image in it.

Sorry, it looks like I wasn’t clear. My idea is to add a Twitter account field in admin to have nice Twitter card for subject.
Here is what we have currently with the Twitter card validator:

3 个赞

Did this go anywhere? My use case: a reader appreciates a post I’ve written. They want to share it out on Twitter using the built-in Discourse link-share feature. That feature defaults the content of the tweet to Title and URL. If my Twitter handle was part of my Discourse profile then the default text could also include ‘via @myaccount’ and I would get a notice in Twitter and I could, in turn, retweet and that might drive more readers back into the Discourse.

3 个赞

Hey David, it is a good idea but I don’t think I was the original poster. Good luck in pursuing.

Chris

----- Reply message -----

Yes, hoping to hear from @CamilleRoux soon :slight_smile: