Keyword

Problem with image share on facebook

More
9 years 3 weeks ago #153075 by Martin Rother
Replied by Martin Rother on topic Problem with image share on facebook
This is through 'jch optimized', too.
The static-url points to the same directory but is a CNAME Record. It is only unsed becaus of cookieless delivery... No speedup setting...

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 3 weeks ago #153115 by Krikor Boghossian
Replied by Krikor Boghossian on topic Problem with image share on facebook
I see,
I think at this point you should manually add the og:tag using this function docs.joomla.org/JDocument/setMetaData and this variable: $this->item->image;

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

More
9 years 3 weeks ago - 9 years 3 weeks ago #153116 by Martin Rother
Replied by Martin Rother on topic Problem with image share on facebook
Thank you,

now the og:image-tag ist there, but the image-url is not correct
output:

<meta property=og:image content=$this-&gt;item-&gt;image />

Tested with an without semicolon at the end

i have inserted it into item.php
<?php
$doc =& JFactory::getDocument();
$doc->setMetaData( 'og:image', '$this->item->image;' );
?>
Last edit: 9 years 3 weeks ago by Martin Rother.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 3 weeks ago #153125 by Krikor Boghossian
Replied by Krikor Boghossian on topic Problem with image share on facebook
Is should be $this->item->image instead of '$this->item->image;' (remove the quotes and the semicolon)

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

More
9 years 3 weeks ago #153140 by Martin Rother
Replied by Martin Rother on topic Problem with image share on facebook
Ok thanks.
the code is now:


and i get this:


if i change the tag-name to og:image:url it looks like this:

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 3 weeks ago #153158 by Krikor Boghossian
Replied by Krikor Boghossian on topic Problem with image share on facebook
My bad, sorry.
$this->item->image will provide a relative URL, while you need an absolute URL.

Instead of:
$this->item->image

You should use:
'http://yourdomain.com'.$this->item->image

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

More
9 years 3 weeks ago #153202 by Martin Rother
Replied by Martin Rother on topic Problem with image share on facebook
It finally worked, thank you very much!

Nevertheless, it would be interesting to know what is the problem.

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

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
9 years 3 weeks ago #153221 by Krikor Boghossian
Replied by Krikor Boghossian on topic Problem with image share on facebook
Indeed.
If you feel like experimenting, or you have a dev site available,
you can deactivate extensions one by one to see which is causing this issue.

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


Powered by Kunena Forum