Facebook Share does not pick up image from article
Rate this topic: 1.00 out of 6 based on 1 vote(s)
- GK User
- Fri Oct 09, 2015 12:57 am
- Reply with quote
- Report this post
Hi supporters,
I tried to share articles by Facebook but it does not pick up an image from the articles or does not pick up any image at all.
I tried to read other topic on the same issue but do not know how to correct it.
Please come to one of my page to see and help me to solve:
http://photowording.com/dinhduong/496-t ... %E1%BB%95i
Thank you and regards,
Hai
I tried to share articles by Facebook but it does not pick up an image from the articles or does not pick up any image at all.
facebook share.jpg
I tried to read other topic on the same issue but do not know how to correct it.
Please come to one of my page to see and help me to solve:
http://photowording.com/dinhduong/496-t ... %E1%BB%95i
Thank you and regards,
Hai
-
- Gold Boarder
- teitbite
- Mon Oct 12, 2015 11:55 am
- Reply with quote
- Report this post
Hi
You need to use either intor or full article image loading option to process it. I think it's when joomla pick up the image for social shearing.
You need to use either intor or full article image loading option to process it. I think it's when joomla pick up the image for social shearing.
-
- Moderator
- GK User
- Mon Oct 12, 2015 12:27 pm
- Reply with quote
- Report this post
Hi TEITBITE,
Can you tell me more clearly?
I see these code in file: public_html/templates/gk_news2/html/com_content/article/default.php
------------------
$og_title = $this->escape($this->item->title);
$og_type = 'article';
$og_url = $cur_url;
if (version_compare( JVERSION, '1.8', 'ge' ) && isset($images->image_fulltext) and !empty($images->image_fulltext)) { $og_image = $uri->root() . htmlspecialchars($images->image_fulltext);
$pin_image = $uri->root() . htmlspecialchars($images->image_fulltext);
} else {
$og_image = '';
preg_match('/src="([^"]*)"/', $this->item->text, $matches);
if(isset($matches[0])) {
$pin_image = $uri->root() . substr($matches[0], 5,-1);
}
}
$og_site_name = $template_config->sitename;
$og_desc = 'Diễn đàn chia sẻ kiến thức và kinh nghiệm nuôi dạy con!';
if(isset($article_attribs['og:title'])) {
$og_title = ($article_attribs['og:title'] == '') ? $this->escape($this->item->title) : $this->escape($article_attribs['og:title']);
$og_type = $this->escape($article_attribs['og:type']);
$og_url = $cur_url;
$og_image = ($article_attribs['og:image'] == '') ? $og_image : $uri->root() . $article_attribs['og:image'];
$og_site_name = ($article_attribs['og:site_name'] == '') ? $template_config->sitename : $this->escape($article_attribs['og:site_name']);
$og_desc = $this->escape($article_attribs['og:description']);
}
------------------
Do I have to correct these codes? Because when I check the link: https://developers.facebook.com/tools/debug/og/object/
There are warnings for fixing as follows:
-------------
Warnings That Should Be Fixed
Inferred Property The 'og:url' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property The 'og:title' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property The 'og:description' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags.
-------------
But I don't know how to do to fix it.
Thank you and regards,
Hai
Can you tell me more clearly?
I see these code in file: public_html/templates/gk_news2/html/com_content/article/default.php
------------------
$og_title = $this->escape($this->item->title);
$og_type = 'article';
$og_url = $cur_url;
if (version_compare( JVERSION, '1.8', 'ge' ) && isset($images->image_fulltext) and !empty($images->image_fulltext)) { $og_image = $uri->root() . htmlspecialchars($images->image_fulltext);
$pin_image = $uri->root() . htmlspecialchars($images->image_fulltext);
} else {
$og_image = '';
preg_match('/src="([^"]*)"/', $this->item->text, $matches);
if(isset($matches[0])) {
$pin_image = $uri->root() . substr($matches[0], 5,-1);
}
}
$og_site_name = $template_config->sitename;
$og_desc = 'Diễn đàn chia sẻ kiến thức và kinh nghiệm nuôi dạy con!';
if(isset($article_attribs['og:title'])) {
$og_title = ($article_attribs['og:title'] == '') ? $this->escape($this->item->title) : $this->escape($article_attribs['og:title']);
$og_type = $this->escape($article_attribs['og:type']);
$og_url = $cur_url;
$og_image = ($article_attribs['og:image'] == '') ? $og_image : $uri->root() . $article_attribs['og:image'];
$og_site_name = ($article_attribs['og:site_name'] == '') ? $template_config->sitename : $this->escape($article_attribs['og:site_name']);
$og_desc = $this->escape($article_attribs['og:description']);
}
------------------
Do I have to correct these codes? Because when I check the link: https://developers.facebook.com/tools/debug/og/object/
There are warnings for fixing as follows:
-------------
Warnings That Should Be Fixed
Inferred Property The 'og:url' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property The 'og:title' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property The 'og:description' property should be explicitly provided, even if a value can be inferred from other tags.
Inferred Property The 'og:image' property should be explicitly provided, even if a value can be inferred from other tags.
-------------
But I don't know how to do to fix it.
Thank you and regards,
Hai
-
- Gold Boarder
- teitbite
- Wed Oct 14, 2015 11:29 am
- Reply with quote
- Report this post
Hi
This part of code means that this all the og: informations can be configured in article separately, but there is a way this can happen automatically. Please check if You have Open Graph plugin installed and enabled. You can find it in rest_files package for Your template. Than this plugin takes intro or full article image to it's settings.
This part of code means that this all the og: informations can be configured in article separately, but there is a way this can happen automatically. Please check if You have Open Graph plugin installed and enabled. You can find it in rest_files package for Your template. Than this plugin takes intro or full article image to it's settings.
-
- Moderator
- GK User
- Wed Oct 14, 2015 12:47 pm
- Reply with quote
- Report this post
Hi TEITBITE,
I found and installed Open Gragh. Can you tell me how to configure its parameter?
Title:
Type:
Article thumbnail:
Site name:
Description:
Thank you and regards,
Hai
I found and installed Open Gragh. Can you tell me how to configure its parameter?
open gragh.jpg
Title:
Type:
Article thumbnail:
Site name:
Description:
Thank you and regards,
Hai
-
- Gold Boarder
- teitbite
- Fri Oct 16, 2015 1:57 pm
- Reply with quote
- Report this post
Hi
You just need to select the default image and make sure this plugin is enable. It's a very simple plugin, so if You need a more complex one with more options You cn try one of those: http://extensions.joomla.org/extensions ... aph&filter[tags][]=&filter[core_catid]=&filter[includes]=&filter[versions]=&filter[type]=&filter[hasdemo]=&filter[newupdated]=&filter[score]=&dir=DESC&limitstart=&controller=filter&view=extension&layout=list&Itemid=145&clearorders=0&clearfilters=1
You just need to select the default image and make sure this plugin is enable. It's a very simple plugin, so if You need a more complex one with more options You cn try one of those: http://extensions.joomla.org/extensions ... aph&filter[tags][]=&filter[core_catid]=&filter[includes]=&filter[versions]=&filter[type]=&filter[hasdemo]=&filter[newupdated]=&filter[score]=&dir=DESC&limitstart=&controller=filter&view=extension&layout=list&Itemid=145&clearorders=0&clearfilters=1
-
- Moderator
- GK User
- Fri Oct 16, 2015 2:19 pm
- Reply with quote
- Report this post
Hi Teitbite,
Because my website allows users to post article from front-end. I cannot set image for each article. Is there any plugin that allows me to set up image share for all articles automatically? Please try to help me or give me some advice as I tried many plugins but they cannot work.
Or is there any way I can declare in the file? public_html/templates/gk_news2/html/com_content/article/default.php
Thank you and regards,
Hai
Because my website allows users to post article from front-end. I cannot set image for each article. Is there any plugin that allows me to set up image share for all articles automatically? Please try to help me or give me some advice as I tried many plugins but they cannot work.
Or is there any way I can declare in the file? public_html/templates/gk_news2/html/com_content/article/default.php
Thank you and regards,
Hai
-
- Gold Boarder
- GK User
- Sun Oct 18, 2015 6:22 am
- Reply with quote
- Report this post
Hi Teitbite
Thank you for your suggestion.
I installed Compago Social Share and it seemed to work.
When I view page source, I saw that "og:image" takes the right picture:
And when I click "Share", it takes that picture:
However, in Facebook, it displays another picture or no picture at all.
In page source, I see some "og:" appears two times. I think one from what we described in file: public_html/templates/gk_news2/html/com_content/article/default.php, the other from the extension: Compago Social Share.
Can you help me to check it there is anything wrong?
Thank you and regards,
Hai
Thank you for your suggestion.
I installed Compago Social Share and it seemed to work.
When I view page source, I saw that "og:image" takes the right picture:
Untitled-2.jpg
And when I click "Share", it takes that picture:
Untitled-1.jpg
However, in Facebook, it displays another picture or no picture at all.
Untitled-13.jpg
In page source, I see some "og:" appears two times. I think one from what we described in file: public_html/templates/gk_news2/html/com_content/article/default.php, the other from the extension: Compago Social Share.
Can you help me to check it there is anything wrong?
Thank you and regards,
Hai
-
- Gold Boarder
- teitbite
- Tue Oct 20, 2015 4:40 pm
- Reply with quote
- Report this post
Hi
Just remove a line:
from public_html/templates/gk_news2/html/com_content/article/default.php. So this will not get doubled.
Just remove a line:
- Code: Select all
$doc->setMetaData( 'og:image', $og_image );
from public_html/templates/gk_news2/html/com_content/article/default.php. So this will not get doubled.
-
- Moderator
- GK User
- Wed Oct 21, 2015 4:28 am
- Reply with quote
- Report this post
Hi teitbite,
Does it affect the image picking-up if og tags are double?
I mean that do I really need to delete the code?
Thank you and regards,
Hai
Does it affect the image picking-up if og tags are double?
I mean that do I really need to delete the code?
Thank you and regards,
Hai
-
- Gold Boarder
- teitbite
- Sun Oct 25, 2015 1:11 pm
- Reply with quote
- Report this post
Hi
If You have the og:image set twice than facebook will take the second in order. If You are sure the plugin You are using will always be used after the tag generated by article layout than You do not have to remove it, but if You;re not sure, than better get rif of the confusing line.
If You have the og:image set twice than facebook will take the second in order. If You are sure the plugin You are using will always be used after the tag generated by article layout than You do not have to remove it, but if You;re not sure, than better get rif of the confusing line.
-
- Moderator
- GK User
- Mon Oct 26, 2015 11:24 am
- Reply with quote
- Report this post
Thank you Teitbite.
-
- Gold Boarder
- teitbite
- Tue Oct 27, 2015 6:31 pm
- Reply with quote
- Report this post
Hi
No problem Glad I could help.
No problem Glad I could help.
-
- Moderator
- GK User
- Wed Oct 28, 2015 5:12 pm
- Reply with quote
- Report this post
Hi Teitbite,
I still have problem with open graph.
I inspect element and see that the image og is correct, but the image does not appear when sharing.
Can you help me to check this url: http://photowording.com/keconnghe/703-a ... %A5t-ngoan
I tried many ways but cannot solve it.
Thank you and regards,
Hai
I still have problem with open graph.
I inspect element and see that the image og is correct, but the image does not appear when sharing.
ogimage.jpg
Can you help me to check this url: http://photowording.com/keconnghe/703-a ... %A5t-ngoan
I tried many ways but cannot solve it.
Thank you and regards,
Hai
-
- Gold Boarder
- teitbite
- Sat Oct 31, 2015 7:22 pm
- Reply with quote
- Report this post
Hi
Your link shows error 404 page. I think problem may be because the special character used in url. Or simply facebook has not refreshed it yet.
Anyway since the requirements are met and og:image is included than You must probably have to ask facebook developers for help.
Your link shows error 404 page. I think problem may be because the special character used in url. Or simply facebook has not refreshed it yet.
Anyway since the requirements are met and og:image is included than You must probably have to ask facebook developers for help.
-
- Moderator
- GK User
- Wed Nov 04, 2015 4:16 am
- Reply with quote
- Report this post
Hi Teitbite,
Thank you for your help. Facebook sharing works well in my site now.
Hai
Thank you for your help. Facebook sharing works well in my site now.
Hai
-
- Gold Boarder
- teitbite
- Fri Nov 06, 2015 6:52 pm
- Reply with quote
- Report this post
Hi
Great to hear that. Happy I could help
Great to hear that. Happy I could help
-
- Moderator
17 posts
• Page 1 of 1