- Posts: 7
COMMUNITY FORUM
Facebook Share Thumbnail
- Nick
-
Topic Author
- Offline
- New Member
So I have a website ( thegamerslife.eu ) and I use K2 to create the content. The website is not fully complete, but as I try to finish it, I upload some content as well. So when trying to share an article of my website to facebook, the thumbnail preview is just the name of my website. No intro image,no title, no description. I know that it is something to do with og tags but, I can not figure out what exactly to do or what piece of code to paste. TL;DR : I need everytime I share an article on facebook, to have a thumbnail preview with the title of the article, and the intro image of that article. Help will be kidly appriciated.
Thank you in advance,
Nick
Please Log in or Create an account to join the conversation.
- Nick
-
Topic Author
- Offline
- New Member
- Posts: 7
i.imgur.com/pTLTu8g.png
I also tried to add a piece of code in my html/com_k2/templates/default item.php file. I added the code below
$doc =& JFactory::getDocument();
$doc->setMetaData( 'og:image', 'thegamerslife.eu/'.$this->item->image);
but still nothing
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
$doc =& JFactory::getDocument();
$doc->setMetaData( 'og:image', 'thegamerslife.eu'.$this->item->image);
will not produce a double quote //.
Can you try with this code instead?
Please Log in or Create an account to join the conversation.
- Nick
-
Topic Author
- Offline
- New Member
- Posts: 7
"Provided og:image URL, thegamerslife.eu/gamers/media/k2/items/cache/f8a458e18503c86603dc02339a944feb_L.jpg was not a valid URL"
could it be that I upload the intro image from my pc to the K2 article and not via search from the server ?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
If not, this will break the URL.
Furthermore, how come are you not using K2's default og: image tag?
thegamerslife.eu/gamers/media/k2/items/cache/f8a458e18503c86603dc02339a944feb_L.jpg
Please Log in or Create an account to join the conversation.
- Nick
-
Topic Author
- Offline
- New Member
- Posts: 7
I just use whatever was on default by the template, it is a quick start, I don't know if that anwsers your question though ! I'm kinda new to the whole CSS side of Joomla
But anyways, Thank you so very much for your help, I kindly appriciate it
Please Log in or Create an account to join the conversation.
- Nick
-
Topic Author
- Offline
- New Member
- Posts: 7
Please Log in or Create an account to join the conversation.
- Mohamed Abdelaziz
-
- Offline
- Platinum Member
- Joomla Developer
Maybe it is a cache issue, can you check whether the cache is disabled or enabled?
Multiple Extra Fields Groups for K2
AutoMeta for K2
Chained Fields for K2
More K2 Extensions In My Extensions Store
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Furthermore the site seems to be down so FB cannot access these images.
Please Log in or Create an account to join the conversation.
- Nick
-
Topic Author
- Offline
- New Member
- Posts: 7
@Krikor I used that code because before i added it, thumbnails and titles when sharing on facebook didn't work. So I added the code. Worked for one article, then stopped working again. I deleted the piece of code, still nothing. The site is always online, did you see it down in some particular moment ?
Another thing is that the template I use, I think overrides the k2. It's the Game quickstart from Gavick. Does this matter ?
Also, when inspecting any article througt chrome inspection tool, I see all the og tags in the head of the code. But still facebook ignores them.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
Facebook Debugger says "
Provided og:image, thegamerslife.eu/gamers/media/k2/items/cache/e17bf28887a04e7713039bc3ae638d41_XL.jpg could not be downloaded because it exceeded the maximum allowed sized of 8Mb or your server was too slow to respond."
So you need to use a smaller image size.
You can check your og: tags here developers.facebook.com/tools/debug/sharing/?q=http%3A%2F%2Fthegamerslife.eu%2Fgamers%2Ftemplate%2Fk2%2Fk2-categories%2Fnews%2Fitem%2F282-overwatch-new-map
Please Log in or Create an account to join the conversation.
- Nick
-
Topic Author
- Offline
- New Member
- Posts: 7
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
- Posts: 15920
- Remove the extra code.
- Ask the template's dev if there is extra code which generates og:images (probably not)
- In K2's settings, select a smaller size for the og:images.
The setting is called "Image size to use when posting K2 items on Facebook", you should select Medium.
- Wait a few hours until Facebook's cache clears and the changes can be seen ( we have no control over this ).
This is default functionality and it works out of the box without the need to put extra code.
Please Log in or Create an account to join the conversation.