- Posts: 22
COMMUNITY FORUM
no facebook image
- HJM Cortooms
-
Topic Author
- Offline
- Junior Member
Less
More
10 years 3 months ago #135698
by HJM Cortooms
no facebook image was created by HJM Cortooms
Searching the web and this forum for days but I can't find a solution for the following problem.
When sharing a K2 item on facebook, there is nog image visible on facebook.
Information from the facebook Open Graph Object Debugger
"Inferred Property The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags."
In the page sourcecode there is no meta tag: <meta property="og:image ....> in the header
What am I doing wrong?
Images are more than 200x200
Joomla 3.3.8, K2 2.6.9, RocketTheme template
When sharing a K2 item on facebook, there is nog image visible on facebook.
Information from the facebook Open Graph Object Debugger
"Inferred Property The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags."
In the page sourcecode there is no meta tag: <meta property="og:image ....> in the header
What am I doing wrong?
Images are more than 200x200
Joomla 3.3.8, K2 2.6.9, RocketTheme template
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- User
Less
More
10 years 3 months ago #135753
by Krikor Boghossian
Replied by Krikor Boghossian on topic no facebook image
Try adding ?template=system (&templ... if you are not using SEF) in your URL to see if the OG tags are present.
If they are still not present, please send me a link, if they are present then it is a template issue.
If they are still not present, please send me a link, if they are present then it is a template issue.
Please Log in or Create an account to join the conversation.
- HJM Cortooms
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 22
10 years 3 months ago - 10 years 3 months ago #135800
by HJM Cortooms
Replied by HJM Cortooms on topic no facebook image
After adding "?template=system" They are still not present.
www.cortooms.nl/hemelberg/index.php/component/k2/item/2-burendag-2014
The facebook scrape information couldn't find an og:image, but tells me that it will show the right image.
But in real, facebook shows a wrong image or no image at all.
www.cortooms.nl/hemelberg/index.php/component/k2/item/2-burendag-2014
The facebook scrape information couldn't find an og:image, but tells me that it will show the right image.
But in real, facebook shows a wrong image or no image at all.
Last edit: 10 years 3 months ago by HJM Cortooms.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- User
Less
More
10 years 3 months ago #135820
by Krikor Boghossian
Replied by Krikor Boghossian on topic no facebook image
Are you using any social or SEF plugins?
Also is it possible to remove HTML minification?
Also is it possible to remove HTML minification?
Please Log in or Create an account to join the conversation.
- HJM Cortooms
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 22
10 years 3 months ago #135841
by HJM Cortooms
Replied by HJM Cortooms on topic no facebook image
sh404sef - Akeeba Release System -> now disabled
system - sef -> now disabled
JCH optimize -> now disabled
sharethis -> now disabled in K2 item
No result
No og:image
Is the creation of the metatag og:image implemented in K2?
system - sef -> now disabled
JCH optimize -> now disabled
sharethis -> now disabled in K2 item
No result
No og:image
Is the creation of the metatag og:image implemented in K2?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- User
Less
More
10 years 3 months ago #135847
by Krikor Boghossian
Replied by Krikor Boghossian on topic no facebook image
Yes it is. Check the source of getk2.org/blog/2254-k2-v269-released
You can try asking the template's developer if the template/ framework is using its own social settings and it is overriting K2's og tags.
You can try asking the template's developer if the template/ framework is using its own social settings and it is overriting K2's og tags.
Please Log in or Create an account to join the conversation.
- HJM Cortooms
-
Topic Author
- Offline
- Junior Member
Less
More
- Posts: 22
10 years 3 months ago #135865
by HJM Cortooms
Replied by HJM Cortooms on topic no facebook image
The template (RocketTheme) isn't the problem.
Even with template protostar and with all modules and most plugin disabled, I didn't get a <meta property="og:image" ...> in the sourcecode.
Then I changed the code in ..\components\com_k2\views\item\view.html.php
I "disabled" lines 558, 559 and 563
Now I get a <meta property="og:image" ...> in the sourcecode. And the facebook image works!!
I don't know why it works, but it works.
Krikor, thanks for helping me to find the way to the solution. Maybe you or an other K2 expert knows why it did go wrong on my site(s).
Even with template protostar and with all modules and most plugin disabled, I didn't get a <meta property="og:image" ...> in the sourcecode.
Then I changed the code in ..\components\com_k2\views\item\view.html.php
I "disabled" lines 558, 559 and 563
$facebookImage = 'image'.$params->get('facebookImage', 'Small');
if ($item->$facebookImage)
{
$parts = parse_url($item->$facebookImage);
// if (JFile::exists(JPATH_SITE.$parts['path']))
// {
$image = substr(JURI::root(), 0, -1).str_replace(JURI::root(true), '', $item->$facebookImage);
$document->setMetaData('og:image', $image);
$document->setMetaData('image', $image);
// }
}
Now I get a <meta property="og:image" ...> in the sourcecode. And the facebook image works!!
I don't know why it works, but it works.
Krikor, thanks for helping me to find the way to the solution. Maybe you or an other K2 expert knows why it did go wrong on my site(s).
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- User
Less
More
10 years 3 months ago #135888
by Krikor Boghossian
Replied by Krikor Boghossian on topic no facebook image
The issue is why it was not 'seeing' the image.
Make sure to keep a backup of this file since it will be overriden when you update.
Make sure to keep a backup of this file since it will be overriden when you update.
Please Log in or Create an account to join the conversation.