Keyword

Facebook Share returning Blank Thumbnail

  • Goh Yew Hoe
  • Goh Yew Hoe's Avatar Topic Author
  • Offline
  • Junior Member
More
12 years 2 months ago #100964 by Goh Yew Hoe
Facebook Share returning Blank Thumbnail was created by Goh Yew Hoe
I can't seems to get the thumbnail to display when I share my articles onto facebook. With the debugging tool, I see that facebook is able to find my image and it's url but it display it as a blank?

Here's the link to try it with an article from my site.
Facebook Debugger Tool

As you can see under object properties, for OG Image, the thumbnail is blank but if you click on it. It actually links to the image in my article. The large version of the image.

However I understand that in K2 parameters, there is a place to define image size to share to facebook. Looking at the scrap data from facebook, I can find that meta tag which I define as extra small.
Log in  or Create an account to join the conversation.

More
12 years 2 months ago #100965 by Lefteris
Replied by Lefteris on topic Re: Facebook Share returning Blank Thumbnail
Hi. It seems that Facebook did some changes and now it uses the open graph meta tag (<meta name="og:image" content="XXX" />) instead of the image tag. The best way to do this is find a plugin since Facebook requires also other open graph tags.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Goh Yew Hoe
  • Goh Yew Hoe's Avatar Topic Author
  • Offline
  • Junior Member
More
12 years 2 months ago - 12 years 2 months ago #100966 by Goh Yew Hoe
Replied by Goh Yew Hoe on topic Re: Facebook Share returning Blank Thumbnail
I have a plugin that handles the opengraph however it doesn't work very well for the image. The og image tag will only be detected properly if I insert the image into full text of the article thru the editor. It doesn't work if I just use the intro image given to K2.

This creates a redundant step and also causes problem if using simple image gallery pro plugin because it will just return transparent.gif as placeholder for the gallery. I think the reason why facebook returns with a blank thumbnail at times is also because its trying to download the _L large image size which then timeout in the process, I'm not sure.

I think the simpler way atm would be perhaps to modify K2 source so that instead of saying
Log in  or Create an account to join the conversation.

More
12 years 2 months ago #100967 by Lefteris
Replied by Lefteris on topic Re: Facebook Share returning Blank Thumbnail
Facebook requires much more tags than just the og:image. So adding just this is not a solution. URLs will still get errors by the Facebook debugger tools. That's why i suggested seperate plugin for this. You can however do this in your template overrides:
$document = JFactory::getDocument();
$facebookImage = 'image'.$this->params->get('facebookImage','Small');
if($this->item->$facebookImage){
$document->setMetaData('og:image',substr(JURI::root(),0,-1).str_replace(JURI::root(true),'',$this->item->$facebookImage));
}

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Goh Yew Hoe
  • Goh Yew Hoe's Avatar Topic Author
  • Offline
  • Junior Member
More
12 years 2 months ago #100968 by Goh Yew Hoe
Replied by Goh Yew Hoe on topic Re: Facebook Share returning Blank Thumbnail
I added the code you suggested to item.php with template overwrite and see this added attribute from the scrape url now.
Log in  or Create an account to join the conversation.

  • Goh Yew Hoe
  • Goh Yew Hoe's Avatar Topic Author
  • Offline
  • Junior Member
More
12 years 2 months ago #100969 by Goh Yew Hoe
Replied by Goh Yew Hoe on topic Re: Facebook Share returning Blank Thumbnail
After some very tedious Google search, I found an old topic that contains a solution code by one of the users here. Topic Link
Log in  or Create an account to join the conversation.

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
12 years 2 months ago #100970 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: Facebook Share returning Blank Thumbnail
I'm using this for now and works like a charm too :D. Thanks Lefteris Kavadas for the facebook image code.

					
K2 Rocks \m/

Please Log in or Create an account to join the conversation.

More
12 years 1 month ago #100971 by Darko Petkovski
Replied by Darko Petkovski on topic Re: Facebook Share returning Blank Thumbnail

Kannan Naidu wrote: I'm using this for now and works like a charm too :D. Thanks Lefteris Kavadas for the facebook image code.

Log in  or Create an account to join the conversation.

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
12 years 1 month ago #100972 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: Facebook Share returning Blank Thumbnail
Create template override and add this in item.php

K2 Rocks \m/

Please Log in or Create an account to join the conversation.

More
12 years 2 weeks ago #100973 by Lul Blaka
Replied by Lul Blaka on topic Re: Facebook Share returning Blank Thumbnail
I really don't understand where to put this code ,,,
i putted it in k2 template-default-item.php
but nothing is changed....
i still can not share my k2 items in facebook page

please someone assist...

Please Log in or Create an account to join the conversation.