views:

71

answers:

3

If I insert in my wall a link like this:

http://blog.bonsai.tv/news/il-nuovo-vezzo-della-lega-nord-favorire-i-lombardi-alluniversita/

then facebook extract the image in the post and not the first image in the webpage ( not image logo or other little images for example ) !!

How facebook does that ?

+1  A: 

I can imagine that the Facebook crawler can identify the actual content part, and select an image from it. Similar functionality is used by the Safari Reader functionality. It probably helps that the software used is Wordpress, which is the most popular blogging software. It's a quick win for Facebook to add specific support for this software.

WardB
+1  A: 

Hm, impossible to say without more information about the algorithm they use.

However, from looking at the page's source code you can see that while the image of Bossi is not the first image in the page, it's the first inside the divs "page_content" and "post_content". Maybe Facebooks knows the HTML IDs that the blogging system (Wordpress in this case) uses, and uses these to find the first image that is actually part of the page content.

That would actually be a good idea, and is essentially an implementation of the "semantic web"...

sleske
That makes sense, because when I post to Facebook from my custom CMS it picks up all images, including logo.
Liam Bailey
+1  A: 

My guess is facebook has built some algorithms for distinguishing the actual content from the other data in a html page. When looking at the page you provided it's quite easy since the html element that contains the page content has id="page_content" which is self-explanatory.

ChrisR