I am using mediawiki 1.19 and I've added facebook 'like'. When I click like the image posted is the site logo. How do I take the image from the page. I've run the site through http://developers.facebook.com/tools/debug and it seems og:image is set to the site logo. How do I change this meta property? My site is thepetwiki.com Thanks
You can set a custom og:image on a page by page basis. Just go to Page Settings > Social Image > Upload. If you need to add other OG tags and customize the default settings, go to Page Settings > Advanced > Page Header Code Injection. Read the following section on adding the tags manually and copy-paste the code there.
As of Jan 14, 2021, Facebook's Sharing Debugger at developers.facebook.com/tools/debug emits a warning: Unsupported Image File Extension — Provided og:image URL, https://example.com/og_image.svg does not have a supported extension.
You are going to gave to add some custom og:tags
to the HTML markup of your page and specify the image that you want to use...
Take a look at the example from the Facebook documentation -
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="https://www.facebook.com/2008/fbml"> <head> <title>The Rock (1996)</title> <meta property="og:title" content="The Rock"/> <meta property="og:type" content="movie"/> <meta property="og:url" content="http://www.imdb.com/title/tt0117500/"/> <meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/> <meta property="og:site_name" content="IMDb"/> <meta property="fb:admins" content="USER_ID"/> <meta property="og:description" content="A group of U.S. Marines, under command of a renegade general, take over Alcatraz and threaten San Francisco Bay with biological weapons."/> ... </head> ... </html>
As you can see the og:image
parameter is specified here and that allows Facebook to correctly display the meta data associated with that URL...
You might not need all of the og:tags
specified here, title
,url
,image
and description
should be fine for just a LIKE button.
You are already aware of the debugger
tool - it will help you debug your LIKE button and og:tags
. Make some changes in your HTML markup and each time you'll have to send your URL though the debugger to refresh Facebook's cached version of your URL.
A quick Google search gave me this mediawiki
extension that looks like it could help you -
http://www.mediawiki.org/wiki/Extension:OpenGraphMeta
OpenGraphMeta provides OpenGraph protocol metadata for articles on the wiki for 3rd parties like Facebook to extract...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With