PDA

View Full Version : CMS Articles > Facebook posts (Where's the thumbnail?)


GRE
01-20-2011, 06:14 PM
When publishing an article to my site the Facebook Application doesn't give the choice of any thumbnails of pics included in the article.

I've read that a meta tag missing causes this problem. Is there any add-on for that, or how can I fix this issue?:erm:

seite7
01-21-2011, 02:08 PM
I just wanted to open a thread for this myself. I guess the reason is that all the attachment are delivered like this in the source code:
attachment.php?attachmentid=12345&cid=99

Facebook will probably only look for things like .jpg, .png and so on.

But I would also be very interested in any solution for that. Using images for Facebook sharing certainly draws a lot more attention to a post.
And since my CMS articles are are visible to anyone I don't need any rights management for attachments here.

seite7
03-02-2011, 02:36 PM
I figured it out.
In the facebook_functions file in the includes directory there is a line that creates an og:image meta tag. Facebook will prefer to use that image. I commented this line out and now Facebook will give the usual option to select any image from the article. :-)

macroforum
03-08-2011, 01:12 PM
Can you please shows the line commented? Sorry for my bad english. Thanks for the solutions! Antonio

seite7
03-08-2011, 01:33 PM
in includes/functions_facebook.php

REPLACE:
// use the feed image if there is one
if (!empty($vbulletin->options['facebookfeedimageurl']))
{
$og_array['og:image'] = $vbulletin->options['facebookfeedimageurl'];
}

WITH:// use the feed image if there is one
if (!empty($vbulletin->options['facebookfeedimageurl']))
{
#$og_array['og:image'] = $vbulletin->options['facebookfeedimageurl'];
}[/PHP]

The Rocketeer
04-11-2011, 12:48 PM
I am using Vb 4.1.3 and still I have the same problem....no fix, tried the code above, is there any thing else we can do ? :(

hyperviperx99
06-11-2011, 05:53 PM
in includes/functions_facebook.php

REPLACE:
// use the feed image if there is one
if (!empty($vbulletin->options['facebookfeedimageurl']))
{
$og_array['og:image'] = $vbulletin->options['facebookfeedimageurl'];
}

WITH:// use the feed image if there is one
if (!empty($vbulletin->options['facebookfeedimageurl']))
{
#$og_array['og:image'] = $vbulletin->options['facebookfeedimageurl'];
}[/PHP]

I honestly can't tell the difference. Does this really work?

seite7
06-11-2011, 06:09 PM
There is a # which makes the whole line inactive.

hyperviperx99
07-24-2011, 04:50 PM
Thank u so much Seite7! U rock!

GRE
12-23-2011, 03:15 AM
We've reached 4.1.9. and Vbulletin still hasn't fixed that. Thanks Seite7!

paulket
02-19-2012, 05:37 PM
We've reached 4.1.9. and Vbulletin still hasn't fixed that. Thanks Seite7!

We've reached 4.1.10. and Vbulletin still hasn't fixed that.

The change in code above fixed the issue on FB walls and is much appreciated but the problem still exists when viewing updates from friends who have shared something from your (our) site(s). :(

CouponWCents
05-25-2013, 06:20 PM
I just tried to change that and my site went down!!

Warning: require_once([path]/includes/functions_facebook.php) [function.require-once]: failed to open stream: No such file or directory in [path]/includes/functions.php on line 7795

Fatal error: require_once() [function.require]: Failed opening required '/home/content/54/7891054/html/includes/functions_facebook.php' (include_path='.:/usr/local/php5/lib/php') in /home/content/54/7891054/html/includes/functions.php on line 7795

findingpeace
05-28-2013, 04:28 PM
This unfortunately does not seem to fix the problem in 4.2.1 - any other ideas as to why the only available preview image is the logo? Happens for every single page.