View Full Version : Facebook - button should post photo?
November 24th, 2012, 01:22 PM
When you are in the detail of a photo and hit the FB button, the image isn't being put into the post. Shouldn't it? How can I get that to work.
November 24th, 2012, 01:49 PM
That all depends it does if I try it here. Remember if you do not allow guests access to see the photo how would the facebook share script be able to get the image? Just an observation on my part. That is the general rule that alot forget is if you lock down access to guests they forget that they are logged in and viewing a photo where as others can not.
Now there are new open graph meta tags that can be added to the page that might help.
You can edit pp-inc.php and on the globals line for the function printheader add $imgurl. Once you do that you can lower in that function where noted below add the code in bold and see if that helps you.
if ( $metakey && VB3_INTEGRATION == 'off' )
$contentmeta .= "<meta name=\"keywords\" content=\"$metakey\" />\n";
if ( THIS_SCRIPT == "showphoto" )
$social .= <<<PPPRINT
<meta property="og:image" content="$imgurl" />\n
November 24th, 2012, 02:17 PM
My photos are all viewable by guests. I added that code. No joy.
I really need to get this working. Any other places for me to look?
November 24th, 2012, 02:25 PM
No idea without alot more info. You can try it here and see it work or even at my site
A community photo gallery - PhotoPost Photo Gallery (http://www.photopost.com/photopost)
A community photo gallery - ReefTalk Gallery (http://www.reeftalk.com/gallery)
It does work.
November 24th, 2012, 02:29 PM
So, here are the FB links from your site and my site:
without the character substitution:
It seems my URL is being built differently. Where do I change that?
November 24th, 2012, 02:36 PM
Terrance! - Guinea Pig Cage Photos (http://www.guineapigcages.com/photos/showphoto.php?photo=15653)
Cavy the issue is not with our code.
You are setting a static meta og:image tag in your forums header with the content.
<meta property="og:image" content="http://www.guineapigcages.com/forum/images/wheeker-guinea-pig.jpg" />
Therefore every time some one tries to share anything with facebook the image used is going to be
I just got finished telling you about that open graph tag thing and that appears to be your exact issue. You are telling facebook to use that specific image for every one of your facebook posts. I would assume there is some sort of forum setting where your electing to use that static image. You should turn that off. Then defining an open graph for the gallery would work I think.
November 24th, 2012, 02:41 PM
I must have added that back when I wanted FB in there and it wasn't available yet. Will go take that out and try again.
November 24th, 2012, 02:44 PM
Yeah I do not know if its something you added or part of the vb code. I was just saying that is why that same image is on all facebook stuff from your site.
November 24th, 2012, 03:00 PM
So, there was a setting in vb. I took it out yet it's still using it. I even tried it in a different browser. I don't see the meta tag that you are referencing in the source when I display the page. Can you check it again and see if it's still there?
November 24th, 2012, 03:50 PM
You have to be defining that image in vb or facebook somewhere still as that same image keeps coming up. Why else would that same image be coming up over and over again.
Second you have partly applied the og:image stuff I suggested for the gallery global file but your content is empty in that tag because you have not applied $imgurl variable into the printheader functions global line.
try finishing the modification I suggested and see if that helps you.
November 24th, 2012, 04:03 PM
I see your og:image tag is now set but it still does not help you. You need to see where your setting that static image in facebook or where ever as the image still comes up
November 24th, 2012, 04:13 PM
I'll keep looking for that, but in the meantime, I can't believe I left non-friendly urls all this time. Want to change my urls to SEO setting. Did that, but then when I clicked on a link it "white paged." What do I need to do flip that?
November 24th, 2012, 05:25 PM
did you rename the HTACCESS file to .htaccess in the gallery directory. ;)
November 24th, 2012, 07:48 PM
Oh, yeah, working now, thanks.
So, I still can't find where that image is coming from.
It's not in a meta tag.
I even see this meta tag on the page:
<meta property="og:image" content="http://www.guineapigcages.com/photos/data/2/medium/new_liner_plues_gps_006.JPG" />
November 24th, 2012, 08:19 PM
Yes the code I gave you posts a meta tag in the head portion of the page with facebooks open graph parameters.
I can not say where your image is coming from but clearly it is that image that you have been telling facebook to use for long time now. ;)
March 16th, 2013, 06:25 PM
When I post an image to facebook no thumbnail is produced.
All that can be seen is
Activity Stream - Military Images & Photos
A Military Website for photos and images discussion
The link does take the FB user back to the right photo page though
March 16th, 2013, 06:40 PM
Your issue is simple. You have turned on the forum facebook and that is overriding the gallery facebook so the image is not being found.
March 16th, 2013, 06:51 PM
well I think I would rather have Images posted to Facebook so I will turn the forum FB off many thanks Chuck
I assume then that there is no way of having both on?
March 16th, 2013, 06:58 PM
Yeah not much I can do your forum code for facebook messes with things. Nothing we can do about that.
March 16th, 2013, 07:04 PM
Thanks again I have it sorted out now, I seem to be able to use the facebook plugin for VB forums but no thumbnail
March 16th, 2013, 07:44 PM
yes if the forum thing is on the thumbnail is messed with. If the forum facebook is off then the thumbnail will show.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.