WP 2.9 Thumbnail Sharing on Facebook
-
I’ve noticed that there is a whole thread that began after the release of WordPress 2.9 (On facebook) of a small community of people that have the same issue like me.
Our site has stopped finding the thumbnails right after we’ve upgraded to the WordPress 2.9. Any share to Facebook can result in hours of “Searching for thumbnail” and nothing will be found. In addition to that, it sometimes would not even sync the title itself and just show the destination url. This is also the problem with Digg.com submission, it may even tell me that the url does not exist!
We’re really frustrated and were trying to downgrade to 2.8 but unsuccessfully and now we are stuck. Any suggestions?
Here is our website: https://www.bloginity.com
Note that all the posts after the upgrade will not be able to be shared.
-
If you ask your host ‘Is hotlinking disabled on my server by anything automatic on your end?’ you SHOULD get a yes or no answer.
If you have CPanel, you should have an option for Hotlink Protection somewhere in there, so check that too.
Interestingly, I have NO problems with my posts on FB and images. So long as I have the image included in my post. Have you tried assigning the image as the new Post Thumbnail? it’s a new option in 2.9.x
I just checked CPanel and it says HotLink protection is disabled (which is what I want, right?).
My Facebook images are having problems on my other host too now. My function just doesn’t seem to be working there either. (My two hosts are Bluehost and HostGator btw).
It’s an issue because my Fan Page is synchronized with my Twitter, and so when I Tweet that there is a new blog post, it gets sent to the fan page and the first image that is chosen is my header (which looks bad).
I am now looking at the source code of the my sites…on the ones hosted on HostGator is looks like
<link rel="image_src" href="https://www.mysite.com/image.jpg" />
is getting passed on to the header. It’s not really nestled along with all the other link rels but it gets in before the </head>. HOWEVER Facebook is not picking this image up anymore (maybe it needs to be higher up?).
My one blog stopped picking up the image for whatever reason. This is what came up in the source code:
<link rel="image_src" href="" />
I have the same function set up in this blog that is set up in the others…not sure what to make of this. :/
I appreciate all the help Ipstenu. ??
Ok well I fixed the blog that wasn’t working…this is the right code for the function:
function get_social_img() { global $post; if ( is_single ()){ $image = ""; $image = get_post_meta($post->ID, 'fb_img', $single = true); ?> <link rel="image_src" href="<?php echo $image; ?>" /> <? } }
I was missing:
$image = "";
So now all the blogs DO have the correct meta tags for Facebook…it just isn’t being read for whatever reason.
<head> is the place you want this, right?
I think
<head>
is right, it sounds right from the API. Honestly, I just have the image in-line in my post and it works perfectly every time.Hotlinking disabled is what you want ?? That’s good!
This is sounding more and more like a BlueHost problem :/
Uggg what a bummer. I guess I get what I pay for, right? ??
I might try disabling all my plugins to see if that has any effect, I’ll report back if I have any success.
Do you really think it’s a problem with my hosting rather than being a problem with Facebook?
It could go either way.
I know that FB images work fine if they’re included in the WP post on a server that ‘talks well’ to FB, and that hasn’t changed as of 2.9.x so either
1) Your host is set up weird
2) WP has changed how it ‘includes’ files
3) FB has change how it pulls files#3 would have a LOT more people screaming.
Now #2 is a bit odd, since on one hand, I want to say clearly it did, BUT your code works on one blog and not another, and the main diff is the host.
Check the plugins, see how that goes. Try manually posting the like to FB, see if it works without Twitter in the middle… The simplest answer is #1 :/
I really appreciate your helping Ipstenu, thanks so much. ??
I don’t think it’s actually the hosts anymore. Both are now getting the correct
<link rel="image_src" href="https://www.mysite.com/image.jpg" />
in the<head>
, but now neither is supplying that image to Facebook.I thought the blog on HostGator was working before because I only had 1 picture in the post and no comments (w/ avatars), whereas my blog on BlueHost has multiple pictures in the post and lots of comments (w/ avatars), so when I posted the link to Facebook, it only gave me one picture option (which is what it did when it was working, gives you only 1 option, the picture I specify).
(For all of this testing I’ve been posting the link to Facebook by hand rather than through Twitter btw.)
So what I did was disable all plugins on both blogs and switch the themes to default (kubrik). I added the function into the default themes functions to get the Facebook image, and checked the page source to make sure it came up on both blogs, which it did.
I still had no luck when I posted those links to Facebook. Facebook is not recognizing the
<link rel="image_src" href="https://www.mysite.com/image.jpg" />
for whatever reason.I’m looking back through my Facebook updates and it looks like the last time things worked for sure was December 18th. December 21st and onward is when things haven’t been working. I think that may have been when I upgraded to 2.9, I just didn’t realize the problem was occurring at the time (holidays going on etc…).
SOOOO I think it’s something on the WordPress end. I find it unlikely both BlueHost and HostGator acquired issues at the same time, and like you said if it was a FB issue then like you said, a lot more people would be complaining.
I guess I’ll send something to the WP guys, hope they can look into it. ?? Just not sure where the best place to file this…
Facebook is not recognizing the
<link rel="image_src" href="https://www.mysite.com/image.jpg" />
for whatever reason.What happens if you put that image in the context of your post and not just the header?
I’m an idiot…I now realize that Facebook stores the link info for a certain amount of time, so I needed to create new posts to really check if it was working or not.
It turns out there is some kind of conflict with WP Ajax Edit Comments. When I turn it off, Facebook is able to recognize
<link rel="image_src" href="https://www.mysite.com/image.jpg" />
. When it is the plugin is on, Facebook doesn’t pick up the image.I’ll contact the makers of the plugin and let them know the issue. I am 90% sure it’s the problem. I didn’t try every single combination of disabling plugins to confirm it’s Ajax Edit Comments, but I did try ones I thought may be the problem, namely WP Super Cache and WP Minify.
I’m happy to at least know the problem…now I’m not sure if the upgrade to 2.9 causes an issue with the plugin or if Ajax Edit Comments had to be upgraded and they changed their code or what.
Can someone please help me?
My site is scrink.com and when I share a link to my fan page the thumbnail isn’t showing up. It initially was, but now when I share a link I only get the description. Sometimes I see the thumbnail but when I actually push “share” and it submits, the thumbnail disappears. Please help.
https://www.facebook.com/pages/Scrink-Bring-Me-Up/211534253105
I had the same problem:
thumb image shows only in preview, not in wall. It used to work then stopped and not because of WordPress (I still have 2.8.4).
I’ve done some tests and I think the cause is the jpg format. I’ve created two identical pages with only 1 jpg but while the first one is the original (found on the web) the second one was edited in photoshop and saved as jpg for web (100% quality, so even bigger).
The second one works correctly in both preview and wall.
https://www.libreidee.org/testimage4.html
https://www.libreidee.org/testimage5.html
as you can see is not and image_src problem (I did not use it in both)my solution: I use for image_src the wordpress generated thumb (your_image-150×150.jpg) and that just works:
in header.php:<?php if(is_single()) { global $wp_query; $post_id = $wp_query->post->ID; $arrImages =& get_children('post_type=attachment&post_mime_type=image&post_parent=' . $wp_query->post->ID ); if($arrImages) { $arrKeys = array_keys($arrImages); $iNum = $arrKeys[0]; $sThumbUrl = wp_get_attachment_thumb_url($iNum); echo '<link rel="image_src" type="image/jpeg" href="'. $sThumbUrl .'" />'; } else { echo '<link rel="image_src" type="image/jpeg" href="defaultThumb" />'; } }?>
vitto32 your solution is perfect.
this has been driving me mental for two days ??
thank you.Vitto’s solution does not work for me. This is driving me NUTS! Thumbnail shows until I hit SHARE, then it disappears. I can’t believe no one is raising hell and getting this fixed.
I’ve been working on this for 2 days…I concur it is not a 2.9 problem as I am running 2.8.4. My case is the same as philsteele, although I do have some older posts where the thumbnails do appear correctly. I also have images in a NextGen gallery and these seem to work.
I can’t for the life of me find any difference between the images that work and do not work. Some are hosted on the blog’s server (GoDaddy) and some are linked through pBase. No correlation.
Does anyone know if FB refreshes the thumbnail list each time you attempt to attach? Is there a waiting time or a way to force FB to re-scrape the blog? I probably should be creating new posts as was suggested. I do hope someone comes up with the answer. Right now it seems random.
Vitto32, I think you are right and that this has something to do with the jpg format or the meta data in the jpg.
I created a new post with an image that I knew worked. The preview worked after a Share.
I switched the image to one that didn’t work. The thumbnail preview did not show the new image, proving that FB does not refresh the thumbnail data once it scraped the page.
I created a new post with the image that did not work. Image appears on thumbnail selection, does not appear on Share.
I took this image into Photoshop and used “Save for Web” with only the copyright and contact EXIF.
I placed this image on a new post, thumbnail preview works, Share works!
I’m using Lightroom to export all my images. I’ll try now to isolate what is different in the image that worked and did not work, at least here is a workaround for new posts. Can someone do this with 2.9.1? I’m still on 2.8 and not upgrading for now.
I probably should do a few more test cases before I get too excited ??
- The topic ‘WP 2.9 Thumbnail Sharing on Facebook’ is closed to new replies.