Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

When I share some of my blog posts, Facebook doesn't display their right thumbail or anyn related image to the posts ... It just gives 3 unrelated thumbails to choose ...

For example , FB shows the right thumbail with this post :

http://www.moroccoenglish.com/?p=480

while it doesn't with this post :

http://www.moroccoenglish.com/?p=578

How can I set FB to display me the related thunmbails of the shared post ?

thanks for helping me ...

share|improve this question
    
Without a question and a bit more information there's little anyone can do to help out. Can you edit your question to provide any additional information? –  Stephen Feb 3 '13 at 22:40

1 Answer 1

Why would you expect it to correctly guess your thumbnail? Facebook detects images based on the Open Graph protocol. If you don't have a meta tag specifying the image for that page, the best you can hope for is FB guessing based on any images in the page.

If you want to get the correct image, you would need the following code in your header for each page:

<meta property="og:image" content="<full URL to image here>" />

If you want a plugin solution, Add Meta Tags is a good option. It does much more than Open Graph, which will be good for your SEO.

Facebook provides a Debugger where you can test the end result.

share|improve this answer
    
Thanks dan, concerning : <meta property="og:image" content="<full URL to image here>" /> .... which image url I should I put ?? –  user1973523 Feb 3 '13 at 23:49
    
That's up to the specifics of your project. I would be inclined to use the featured image if it is set and have a fallback if it is not. –  Dan Feb 4 '13 at 0:30
    
I get this error messager from the validator : –  user1973523 Feb 4 '13 at 1:01
    
I get this message from validator : <meta property="og:image" content="moroccoenglish.com/wp-content/upl…✉ You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead). –  user1973523 Feb 4 '13 at 1:02
    
The URL in your comment doesn't appear to point anywhere. In any event, I am 95% sure the og protocol requires the http/https protocol specifier in the URL. –  Dan Feb 4 '13 at 1:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.