Question

I've been working on a Joomla site with custom template, and I've had to create some custom share buttons for Google+, email, Twitter & Facebook. The first three work fine, but the Facebook one is causing problems. I'm using K2 and have got all the Open Graph meta tags within the header - having added the site_name & fb:app_id tags manually as K2 adds all the others, but not these. However, if I try to share a blog post Facebook doesn't pick up anything other than the URL.

I've tested with the Facebook debugger and all the meta information is being scraped. I know that it can take a while for the sharer to pick up any changes, and thanks to the debugger I discovered that I had to switch off gzip in order for the correct page to be loaded and the tags scraped. I made that change on Friday lunchtime, and have just checked the site again today and there is no change, the sharer is still coming back with empty data except for the URL.

I'm using this link (the URL is generated automatically by the site):

<a href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.mydomain.co.uk%3A80%2Fblog%2Fcategory%2Fpage-title" target="_blank">Share on Facebook</a>

and the following Open Graph tags:

<meta property="og:url" content="http://www.mydomain.co.uk/blog/category/page-title">
<meta property="og:title" content="Page Title - My Domain">
<meta property="og:type" content="article">
<meta property="og:image" content="http://www.mydomain.co.uk/media/k2/items/cache/9b2c4b44fb86522964124ed80d03c5e8_M.jpg">
<meta name="image" content="http://www.mydomain.co.uk/media/k2/items/cache/9b2c4b44fb86522964124ed80d03c5e8_M.jpg">
<meta property="og:description" content="Page Intro Text">

Can anyone please suggest what I've missed or got wrong?

Thanks!

Was it helpful?

Solution

The URL you are using in sharer link is

http://www.mydomain.co.uk:80/blog/category/page-title

and the URL at og:url is

http://www.mydomain.co.uk/blog/category/page-title

i.e. there is a difference in both URLs (:80 in the URL at sharer link), so it may cause issue.

Try to use same URL both place. May it helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top