-
AuthorPosts
-
xumbrella Friend
xumbrella
- Join date:
- June 2010
- Posts:
- 100
- Downloads:
- 0
- Uploads:
- 10
- Thanks:
- 6
- Thanked:
- 2 times in 1 posts
February 11, 2014 at 3:00 pm #194692Hi I just noticed when you post a comment it does not post the image thumb to the facebook timeline, any idea why this might be?
see attached screen shots, one of the comment on the post, and one of the entry on the commenters timeline..
thanks
-
Wall Crasher Developer
Wall Crasher
- Join date:
- December 2011
- Posts:
- 1113
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 66
- Thanked:
- 361 times in 300 posts
February 13, 2014 at 8:25 am #522509Hi xumbrella,
Please enable JA Lazyload plugin and try to edit pluginssystemjalazyloadjalazyload.php
replace
JResponse::setBody($body);
to
if(JRequest::getCmd('option') == 'com_content' && JRequest::getVar('view') == 'article' && JRequest::getInt('id')){
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('images');
$query->from('#__content');
$query->where('id = ' . JRequest::getInt('id'));
$db->setQuery($query);$images = $db->loadResult();
if($images && strlen($images) > 0){
$images = json_decode($images);if($images && $images->image_intro){
$body = str_replace ('</head>', '<meta property="og:image" content="' . $images->image_intro . '" />' . "n" . '</head>', $body);
}
}
}JResponse::setBody($body);
Please pm ftp/admin information to me so I can check it on your site.
Regards
xumbrella Friendxumbrella
- Join date:
- June 2010
- Posts:
- 100
- Downloads:
- 0
- Uploads:
- 10
- Thanks:
- 6
- Thanked:
- 2 times in 1 posts
February 16, 2014 at 3:41 pm #522880Hi, I updated the code and cleared both browser cache and joomla cache but it still does not post the image… I also notice that using IFTTT that it is unable to post images, is that to the same fault?
I will PM you the admin.. please let me know if you can work out why this does not work correctly.
thanks
Wall Crasher DeveloperWall Crasher
- Join date:
- December 2011
- Posts:
- 1113
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 66
- Thanked:
- 361 times in 300 posts
February 17, 2014 at 8:13 am #522981@ xumbrella,
I have updated the file on your site. Please clear the system cache and try again.
You may need to wait for some days for Facebook to refresh their cache too.I just replaced:
$body = str_replace ('</head>', '<meta property="og:image" content="' . $images->image_intro . '" />' . "n" . '</head>', $body);
with:
$body = str_replace ('</head>', '<meta property="og:image" content="' . JUri::base() . $images->image_intro . '" />' . "n" . '</head>', $body);
Hope it helps.
xumbrella Friendxumbrella
- Join date:
- June 2010
- Posts:
- 100
- Downloads:
- 0
- Uploads:
- 10
- Thanks:
- 6
- Thanked:
- 2 times in 1 posts
February 19, 2014 at 8:49 am #523376Hi Thanks for the help, however, I cleared the cash and made a comment but the post to facebook still shoes no image… see attached screen grab… should I need to wait for facebook to refresh on new posts too?
Wall Crasher DeveloperWall Crasher
- Join date:
- December 2011
- Posts:
- 1113
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 66
- Thanked:
- 361 times in 300 posts
February 20, 2014 at 3:47 am #523552@ xumbrella,
It seems you select not to get cache the youtube image in the past.
Those article which you make a test seems old.I just make change:
if($images && $images->image_intro){
$body = str_replace ('</head>', '<meta property="og:image" content="' . JUri::base() . $images->image_intro . '" />' . "n" . '</head>', $body);
}to
if($images && $images->image_intro){
if(!(strpos($images->image_intro, 'http') === 0 || strpos($images->image_intro, '//') === 0)){
$images->image_intro = JUri::base() . $images->image_intro;
}$body = str_replace('</head>', '<meta property="og:image" content="' . $images->image_intro . '" />' . "n" . '</head>', $body);
}
You can use this tool to check if the image working.
https://developers.facebook.com/tools/debug/http://www.clipular.com/c/4891041362608128.png?k=zIlBNByRM4K_rdsaJi0zDzaNDuI
The facebook cache can be 24 hours.
http://stackoverflow.com/questions/5776567/facebook-open-graph-not-clearing-cachePlease check again.
1 user says Thank You to Wall Crasher for this useful post
xumbrella Friendxumbrella
- Join date:
- June 2010
- Posts:
- 100
- Downloads:
- 0
- Uploads:
- 10
- Thanks:
- 6
- Thanked:
- 2 times in 1 posts
February 21, 2014 at 4:19 pm #523784Hi there, many thanks for your help, it works now.
Can you please explain more what changes you made? I don’t quite understand from your explanation…
thanks again.
Wall Crasher DeveloperWall Crasher
- Join date:
- December 2011
- Posts:
- 1113
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 66
- Thanked:
- 361 times in 300 posts
AuthorPostsViewing 8 posts - 1 through 8 (of 8 total)This topic contains 8 replies, has 2 voices, and was last updated by Wall Crasher 10 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum