5

i developed a website ut when i share any page in facebook

facebook should recognize my page and select images to select a thumbnail

but this do not happen in my website as if facebook can not recognize my page

or cannot read it and select images from it what should i do

to let facebook recognize my page and load all images in the page to navigate left and right to select a thumb for the shared page

3
  • Is this sharing via a Like button on the page? Do you also mean pasting the URL into a status update?
    – Rob Olmos
    Oct 30, 2010 at 20:57
  • You could look at the source code of pages that Facebook shows a selection for to see if there's anything special there.
    – curt
    Oct 31, 2010 at 16:39
  • On the few occasions I've shared links to my own pages with Facebook (admittedly from the Facebook site itself, rather than from my own pages) it's never had any problem recognising, and offering, images to share. Does your page conform to a valid doctype? Are the images in an obscure format? Is there any attempt to prevent hot-linking images from your site? Nov 14, 2010 at 19:07

3 Answers 3

11

Looks like the question has already been answered here. Here is another useful link. Thanks for asking. It made me find out something I can use.

Update: After trying it and finding it not to work I tried the method in this post. It initially didn't work, but that was because I forgot to upload the image. So it may be the case that the original method may still work. Here's the template I used in my head section:

<meta property="og:title" content="your title">
<meta property="og:description" content="your description">
<meta property="og:image" content="http://www.yoursite.com/your-image.jpg">

Update 2: If it seems that Facebook isn't recognizing your code, try their lint tool. This does two things. The obvious one is that it reports any errors in your code. The second is that it refreshes Facebook's cache of the page. I had two pages where the new code wasn't recognized until I did this.

1
  • 1
    Thanks for the link to the FB lint tool, very helpful!
    – llovelett
    Nov 10, 2011 at 16:36
1

From my own tests, Facebook should find images on your site with no problem, so long as they appear directly in the html (as <img src="path/to/img.png" />1) and not via css (background-image: url(path/to/img.png);).

This is my own-site test, at: http://davidrhysthomas.co.uk/so/fbookImg.html, admittedly this doesn't have a 'share this page' button, so requires you to log into Facebook first, which might make a difference. But I don't have a Facebook developer account with which to test that theory, unfortunately.


  1. Either absolute, or relative, paths seem to make no difference.
1

from my experience using a drupal site the logo was not recognized because the drupal system renders a relative path. changing this to a full path with http:// and refreshing FB's cache should work

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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