Search code examples
phpjavascriptajaxfacebookphotos

How does facebook know what images are needed to get from a URL?


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.


Solution

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