Open Graph in posts loop page

I have a loop where all the posts have their own like button, when i click it the facebook window appears but it does not show the right post thumbnail.
I think this is normal because in a posts loop the thumbnails are multiple so the script can not figure which one goes where – on the contrary the like button works perfectly on my single post pages.

So my question: is it possible to have the facebook like button work correctly on a loop page so that it grabs the right post thumbnail even if there are, say 10 posts in that page?

Read More

Maybe i should have multiple Open Graph metas, a set for each post in the loop, but i guess this would just cause a mess, is there something that i can do?

Related posts

1 comment

  1. As far as I know this is not possible the way you’re trying to get it to work. You can specify an image for Facebook to use in the <meta> tag, but that’s about it.

    One thing you can try is use JavaScript to invoke the Facebook feed dialog. It has a picture parameter:

    picture
    The URL of a picture attached to this post. The picture must be at least 50px by 50px (though minimum 200px by 200px is preferred) and have a maximum aspect ratio of 3:1

    The Javascript Example section at the link above is pretty self-explanatory.

Comments are closed.