PDA

View Full Version : Facebook Image META Tags For Wordpress



futurepocket
21 Mar 2011, 11:51 PM
You guys are my last hope at fixing this, I've tried absolutely EVERYTHING. So, on my website: http://futurepocket.com, when you like a post, it takes a random image rather than an image from the post itself (or the custom field defined "Image"), which has nothing to do with the post itself - this is really annoying.

I've tried multiple plugins to add META tags, I currently have All In One SEO Pack, and have tried multiple functions to fix this issue with no results. I've also added Facebook OPENGRAPH META tags to the header, and used a custom PHP script to call the first image from the post. Now, the og:image (if you view page source) is defined as the correct image, but Facebook is still NOT taking that image when it posts it to Facebook. (FYI it works fine for facebook share, but not Facebook like).

Any other suggestions to fix this? Need a quick fix please help!

nnelson04
22 Mar 2011, 07:36 AM
I know this works for the FB share, but it may also work for your FB like pages as well. Placing this absolute div just inside the body tag will let facebook see the image, but won't display on your page:


<div class="fb-logo" style="position:absolute; top:-9999px; left:-9999px;">
<img src="blah.jpg" />
</div>

I haven't done anything with FB like, so I can't know for sure if that solves your problem, but it's always worth a shot.