- Posts: 9
COMMUNITY FORUM
Problem with image share on facebook
- Martin Rother
-
- Offline
- New Member
Less
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...
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
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
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;
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.
- Martin Rother
-
- Offline
- New Member
Less
More
- Posts: 9
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->item->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;' );
?>
now the og:image-tag ist there, but the image-url is not correct
output:
<meta property=og:image content=$this->item->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
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
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.
- Martin Rother
-
- Offline
- New Member
Less
More
- Posts: 9
9 years 3 weeks ago #153140
by Martin Rother
Replied by Martin Rother on topic Problem with image share on facebook
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
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
$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.
- Martin Rother
-
- Offline
- New Member
Less
More
- Posts: 9
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.
Nevertheless, it would be interesting to know what is the problem.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
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.
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.