Tag Archives: tag

How to Collect the Images and Meta Tags from a Webpage with PHP

Meta Tags and the Facebook Example

You’ve definitely seen the “share a link” screen in Facebook. When you paste a link into the box (fig. 1) and press the “Attach” button you’ll get the prompted cite parsed with a title, description and possibly thumb (fig. 2). This functionality is well known in Facebook, but it appears to be well known also in various social services. In fact Linkedin, Reddit, Dzone‘s bookmarklet use it.

Facebook Attach a Link Prompt Screen
fig. 1 - Facebook Attach a Link Prompt Screen

Fist thing to notice is that this information, prompted by Facebook, is the same as the meta tag information. However there is a slight difference.

Facebook Attached Link Screen
fig. 2 - Facebook Attached Link Screen

Facebook prefers for the thumb the image set into the <meta property=”og:image” … />. In the case above this tag appears to be:

<meta property="og:image" content="http://b.vimeocdn.com/ts/572/975/57297584_200.jpg" />

And the image pointed in the SRC attribute is exactly the same as the one prompted by Facebook (fig. 3).

Vimeo Thumb
fig. 3 - Vimeo Thumb

First thing to note is that the real thumb is bigger than the thumb shown in Facebook, so Facebook resizes it and the second thing to note is that there are more meta tags of the og:… format. Continue reading How to Collect the Images and Meta Tags from a Webpage with PHP

OBJECT & … forget about EMBED tag!

Actually most of us think about OBJECT and EMBED tags as inseparate pair. The reality is different. In fact you don’t need to use the EMBED tag.

Only by using the OBJECT tag you ensure it will be interpreted correctly by every browser.

As you may know, the EMBED tag is supported by Gecko and WebKit, but not by IE. On the other side the OBJECT tag is supported by every one.

Why than the most common usage is with OBJECT and EMBED? That’s by me because of misunderstanding of the semantics of those two!