3

Possible Duplicate:
How does Facebook Sharer select Images?

When I attach a link on facebook I get the title, url, description and images from that page.

But facebook separates the images and gives just the important ones. And this is what I don't understand.

For example, attach this link

http://tonlinegames.com/ - This is a gaming site with photos about the games.

When you attach it facebook will give you as results only the image about the games, but there are a lots of other images like buttons and so one.

Community
  • 1
  • 1
Adam Halasz
  • 57,421
  • 66
  • 149
  • 213

4 Answers4

3

Facebook makes use of Open Graph meta tags when available:

http://developers.facebook.com/docs/opengraph

Otherwise, it probably just uses common sense heuristics (title, h1, p tags, large images, etc).

Matthew
  • 47,584
  • 11
  • 86
  • 98
2

There is an official tool called URL Linter that displays which info facebook takes from the page. It doesn't explain which exact rules it uses but there is some useful info in the "debug" section.

serg
  • 109,619
  • 77
  • 317
  • 330
1

there some patterns that facebook could be trying.

  • like the first image that is greater than 50x50 (usually the first big image is the right one).

  • or maybe it looks for the image that is a link to the site itself, since many sites have one like this.

probably facebook combines more than one of these kind of patterns to be more accurate.

Hugo Mota
  • 11,200
  • 9
  • 42
  • 60
1

It probably just looks at the largest images within the body of the website. I'm sure they also have some constraints on what image size can be. Too small wouldn't work when coming up in somebodies feed.

Sam Becker
  • 19,231
  • 14
  • 60
  • 80
  • Brilliant idea, getting the biggest images. however, write my question's link to facebook you will get just an advertisment from the sidebar. – Adam Halasz Aug 30 '10 at 23:39
  • That's probably because the advert on the sidebar is the largest image on the page. – Sam Becker Aug 31 '10 at 00:41