Choices for thumbnail image in a Facebook Link post

When I’m posting a link for a WordPress page or post on a Facebook Page wall (using the “Post a link” option), I want Facebook to offer up, as choices, (a) all images which are embedded in the linked page/post as well as (b) a set of default images (in case the page/post in question has no embedded images).

What I’ve done is add (to wp_head) several candidate images in separate link rel=”img_src” tags.

Read More

The problem is that these link rel tags appear to override any images that are actually embedded in the page/post.

Any advice would be appreciated.

Related posts

Leave a Reply

2 comments

  1. When you’re adding the images in the head, do a query on the posts ID to find posts that are of the post type attachment with the parent ID equal to that of the current post. Then use these attachments to generate the image URLs in your header via wp_get_attachment_image_src .

    This way the ‘candidate’ images will always be images attached to the current post