Topic on Project:Support desk

How to force social media to show prewiev of my wiki?

10
ZielonaMrowka (talkcontribs)
TheDJ (talkcontribs)
Ciencia Al Poder (talkcontribs)
ZielonaMrowka (talkcontribs)

Thanks for the answers! I tried those proposed by @Ciencia Al Poder first and those proposed by @TheDJ then, but after installing them through LocalSettings.php and trying a link in https://developers.facebook.com/tools/debug/sharing/ it shows me code 400 for all pages that use polish diacritic characters. The code does not appear for the main page ("Strona główna") and others that do not use polish diacritic characters (why the main page works then?).

I also don't see any images for other pages than the main page. Not sure if I have to do something more to run those...

Polskie gatunki mrówek page might serve as a reference for the 400 code.

Ciencia Al Poder (talkcontribs)

Looking at the code, the URL seems correct, and it doesn't point to a 404 error.

About the images, after installing PageImages you'll need to run the initImageData.php maintenance script for the extension (or manually edit each page)

ZielonaMrowka (talkcontribs)

Is there a way to remove diacritic letters from URLs? When I create redirect without special charactersin the name of a page and point to a page I want to share with special characters in the URL, Facebook does not display error 400.

It would be nice to change all those special characters to their closest relatives in Latin (ąęźżśćół -> aezzscol).

Ciencia Al Poder (talkcontribs)

It's not possible. Also, I fail to see what's the problem here, because the code it generates is perfectly valid and points to the URL with diacritics (note: the URL is url-encoded)

<meta property="og:url" content="http://wiki.mrowki.ovh/index.php?title=Polskie_gatunki_mr%C3%B3wek" />

ZielonaMrowka (talkcontribs)

Hmm... So it is browser which codes %C3%B3 to display "ó" in my url bar?

Ciencia Al Poder (talkcontribs)

Yes, non-ASCII characters and some other special characters can be URL-encoded, so systems that aren't unicode-compatible can display them properly. ó is encoded as %C3%B3

ZielonaMrowka (talkcontribs)

This explains much. I've spent ~8hours trying to find the cause and the solution and it appears that I didn't have to...

Many thanks!

Reply to "How to force social media to show prewiev of my wiki?"