Keyword

Facebook Share Thumbnail

More
8 years 2 months ago #156324 by Nick
Facebook Share Thumbnail was created by Nick
I know it's a heavily discussed topic, but as a newcomer to Joomla I kinda need a bit more explanation.

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.

More
8 years 2 months ago #156325 by Nick
Replied by Nick on topic Facebook Share Thumbnail
for an example article, when inspecting the code, I see the og tags (in the picture), but then again facebook does not give me a proper thumbnail.

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
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 2 months ago #156332 by Krikor Boghossian
Replied by Krikor Boghossian on topic Facebook Share Thumbnail
I think that,
$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?

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

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

More
8 years 2 months ago #156361 by Nick
Replied by Nick on topic Facebook Share Thumbnail
ok, that fixed 90% of my problem. Title and description is now showing, but about the image I get this message from the facebook dev tools

"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
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 2 months ago #156372 by Krikor Boghossian
Replied by Krikor Boghossian on topic Facebook Share Thumbnail
Was the http:// prefix present in the tag?
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

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

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

More
8 years 2 months ago #156376 by Nick
Replied by Nick on topic Facebook Share Thumbnail
I tryed to post the article this morning and despite the warning from the FB dev tool ,it works like a charm!

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.

More
8 years 2 months ago #156392 by Nick
Replied by Nick on topic Facebook Share Thumbnail
I'm back again. It worked for only one article, then started not working again

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

  • Mohamed Abdelaziz
  • Mohamed Abdelaziz's Avatar
  • Offline
  • Platinum Member
  • Joomla Developer
More
8 years 2 months ago #156421 by Mohamed Abdelaziz
Replied by Mohamed Abdelaziz on topic Facebook Share Thumbnail
Hello Nick,

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
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
8 years 2 months ago #156422 by Krikor Boghossian
Replied by Krikor Boghossian on topic Facebook Share Thumbnail
I would suggest to remove the code altogether, since K2 provides this functionality by default.
Furthermore the site seems to be down so FB cannot access these images.

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

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

More
8 years 2 months ago #156425 by Nick
Replied by Nick on topic Facebook Share Thumbnail
@Mohamed The cache is enabled

@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.


Powered by Kunena Forum