views:

78

answers:

4

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.

+1  A: 

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_leonardo
Nice idea! It can be useful!
CIRK
+1  A: 

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.

Sam152
Brilliant idea, getting the biggest images. however, write my question's link to facebook you will get just an advertisment from the sidebar.
CIRK
That's probably because the advert on the sidebar is the largest image on the page.
Sam152
+1  A: 

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
+3  A: 

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).

konforce