Page MenuHomeMiraheze

Twitter and Facebook won't fetch article previews
Closed, ResolvedPublic


Since we moved to Miraheze, Twitter no longer previews linked articles and Facebook only shows an image but no text. On Fandom it happened automatically. This has probably something to do with SEO meta-tags, so I wondered if you could do something to make the whole wiki more compatible with social media without having to tag every single page we want to post (I don't know, I'm a total noob on such things).

Event Timeline

Hi, do you know which page is having the problem?

I posted 3 pages after moving and none of them got previewed, it's:

I see Facebook is kinda working, but I need more tests. Twitter isn't, and I read it needs "Twitter cards" i.e. meta tags, but I have no idea how it's done and doing it it for every single page is out of question anyway.

You may be interested in (which we have as a available option at miraheze)

I know but it seems like it's only done by inserting the tags inside single pages, which is not doable on a wiki so big (not to mention such a delicate piece of info on pages anyone can edit). Isn't there something you can do upstream? Wikia probably did because before moving we had previews without having to do anything.

Maybe this with OpenGraphMeta could work on wiki-level, but hasn't tested.

Did you manage to resolve this? Or is it still a problem?

Previews work normally on Facebook but on Twitter no preview is shown.

That is because Twitter uses Twitter Cards, not OpenGraph (which is Facebook protocol).

@revi I know, but "Simply add a few lines of markup to your webpage" is a pain in the neck when instead of posting your homepage you have to post 1 out of thousands of single pages and you can't add HTML code not accessible to random visitors. I thought about using a template but I can't protect a page just because we need to post it on Twitter. It's basically unfeasible on a wiki, so maybe too bad for them, we'll just use Facebook.

Anyways, I wonder how Wikia managed to add those Twitter cards automatically to all pages of all their websites.

@Wedhro Because Wikia uses its own extensions under a different version of Mediawiki and it would be to check if it is compatible with the current version of Mediawiki. You can see the extensions and configurations for example here.

As a side note, Reddit will successfully extract the first image from the main body of the page.

This is all interesting but i have no idea what twitter needs for it to work. Maybe a bug in the extension?

I think the extension had an update (and is now hosted on

@Southparkfan Thoughts? Apparently this also needs another security review.

Hello, does this work now? We've upgraded WikiSEO to a new version.

@Wedhro also you probably want to remove the importScript from MediaWiki:common.js or migrate it so it works. As its broke JavaScript.

Theres also "Twitter Card Type (WikiSEO)" in Special:ManageWiki/settings under 'edit' tab. Defaults to summery large image.

I just attempted posting a bare link on Twitter and it rendered as our logo enlarged, with no text, linking to the actual article I wanted to post. In the settings I see the Twitter Card Type gives an error message saying the specified value not being a valid option.

Reception123 closed this task as Resolved.EditedApr 9 2020, 15:59
Reception123 assigned this task to Paladox.

There was a typo that @Paladox fixed and after testing it works for new posts.

@Paladox this isn't fixed yet: on Twitter it only shows our logo and the page title instead of the first lines of text and an image, see for example

Closing as it's nothing we can do, filled the bug upstream which will hopefully be resolved.