How would I go about adding more info like a post title to the share link?
For example:
instead of clicking share and having the text box having: “https://discourse.example.com/xxxxxx”
have:
“Title of post:
AI generated summary or first line of post
https://xxxxx”
and having all this information also carry over to the other share buttons.
like this?
This happens automatically, you just need to expose your Topic publicly.
yeah, something like that, it’s just that I want to have it shared from Discourse(mobile) to WeChat, and WeChat doesn’t load a preview so I am trying to do a facimile of it at the step of clicking the share button on Discourse
So WeChat’s the issue, this stuff is exposed, but it’s on the client to use the data.
Here’s the result on Discord:
yeah, but there’s nothing I can do to wechat unless I get a job at Tencent, that’s why I am trying to do it on this side
Check your Topic is public. I’m surprised WeChat doesn’t consume and use og tags.
og tags have been a standard for many years, introduced by Facebook for link previews.
Otherwise there is nothing you can do.
Here’s proof this is working. Try your link on the Meta debugger at https://developers.facebook.com/tools/debug:
is there no way to edit the text field on load? It seems like some theme components can do it like the url shortener.
WeChat is likely willfully not doing this
I’m not sure you understand the architecture.
The data is exposed to the world.
There is nothing to add.
Just make sure your Topic is not in a private Category and your site is not login only.
I just want people to be able to see:
TITLE
SUMMARY
LINK
when I send a wechat message through the share button, because just having a bare hyperlink is very unappealing and has no preview for context
I understand it is exposed to the world
I suggest raising it with the WeChat community.
Perhaps being a Chinese service with greater government scrutiny they are picky about which sites get to look good?
I also recommend testing your link on Facebook debugger (link provided above) and some more open Western platforms, to check it works.
There might be a misunderstanding you have, WeChat doesn’t do the preview thing at all for any website. If you send a link on WeChat in the text field and not by pressing their special “share” button on their special browser, it gets sent as text and has a hyperlink, but no dynamic loading of any further information.
Well that’s pretty awful
Time to submit a feature request to WeChat?
I just want something like this:
and I am sure this would be much more painless and quick than bringing it up with WeChat
Build it
(tip: this is running on the WeChat side, you have to change WeChat code - there is nothing you can do if WeChat doesn’t process the publicly exposed data)
that’s what I am trying to do lol, just not sure where to start, I have taken the URL shortener component apart to see how it works but I can’t seem to figure out how to get the content of the post
(having never done JS or Ruby sure doesn’t help)
It’s in the og tags of the website in the header, e.g.
A well specced social media platform (Discord, Facebook, Discourse etc.) crawls the page of the link and enriches its local presentation.
That crawling code is the responsibility of the hosting platform (ie Wechat).
In this case Discourse is only serving the page when it is requested.
In this case there is nothing left for Discourse to do - it doesn’t have control on how WeChat presents things locally - how could it?!?
There is also a possibility there is an access issue between WeChat and your server. You could also explore that but you will never know the exact route it’s trying to take because you don’t have those priviliges.
yeah, I am not gonna do that, I just want to change this text box:
so that it includes text before the link rather than just the link
That’s a reasonable goal.
ok so I’m moving this over to Dev
You might be able to achieve that with a Theme Component (if you are lucky )