How Does Facebook Know What Image To Parse Out of An Article?

Posted by Travis on Stack Overflow See other posts from Stack Overflow or by Travis
Published on 2010-06-07T05:12:38Z Indexed on 2010/06/07 5:22 UTC
Read the original article Hit count: 228

Filed under:
|
|
|

First off I want to say that I wasn't really sure where to post this but it is very much programming related. If it is in the wrong spot I apologize and please let me know where I should post it instead.

When sharing an article on a friends wall, facebook will grab a thumbnail of the article. How do they always get the right thumbnail from articles?

It doesn't grab the logo img element of of http://www.nytimes.com/2010/06/07/world/asia/07convoys.html?hp for example but rather grabs the correct image element that corresponds with the article.

I'm looking to do something similar and was wondering of a good way to parse the html to find the image given this example. Thanks.

© Stack Overflow or respective owner

Related posts about html

Related posts about image