Miguel Costa
"A serious and good philosophical work could be written consisting entirely of jokes."
Let your website talk to us!
<meta content='Carlos Batman' />
The Open Graph protocol enables any web page to become a rich object in a social graph - OGP
source (data and images): Stack Overflow
If a tag can have multiple values, just put multiple versions of the same tag on your page. The first tag (from top to bottom) is given preference during conflicts.
og:image supports multiple images
Characteristics and tips
source (data and images): Facebook Developers
Can I avoid this?
source: Facebook Developers
(...) the first person who shares a piece of content won't see a rendered image.
source: Facebook Developers
<a
href="http://www.facebook.com/sharer.php?u={{ url }"
onclick="return !window.open(this.href, 'Facebook')">
Partilhar
</a>
Characteristics and tips
source: Twitter Card Validator
<a
href="https://twitter.com/share?url={{ url }}"
onclick="return !window.open(this.href, 'Twitter')">
Partilhar
</a>
The bare minimum for both, avoiding repetition
<meta property="og:title" content="Title">
<meta property="og:description" content="Some description">
<meta property="og:image" content="http://image-url-example.jpg">
<meta property="og:url" content="the-default-url">
<meta name="twitter:card" content="summary_large_image">
<!-- recommended, for analytical tools -->
<meta property="fb:app_id" content="app-id-whatever" />
<meta name="twitter:site" content="@website-username">
Structured data for search engines
JSON-LD (rec. by Google)
Microdata (in HTML markup)
There are others...
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Person",
"name": "John Wick",
"alternateName": "Boogeyman Killer",
"url": "http://www.johnwickkills.com",
"image": "http://montrealrampage.com/wp-content/uploads/2017/02/jw1.jpg",
"sameAs": "https://www.facebook.com/johnwickmovie/",
"jobTitle": "Assassin",
"worksFor": {
"@type": "Organization",
"name": "Independent"
}
}
</script>
<!-- just an example of structure, of course -->
<span itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="John Wick"/>
<meta itemprop="alternateName" content="Boogeyman Killer"/>
<link itemprop="url" href="http://www.johnwickkills.com"/>
<img itemprop="image" src="http://montrealrampage.com/wp-content/uploads/2017/02/jw1.jpg"/>
<meta itemprop="jobTitle" content="Assassin"/>
<span itemprop="worksFor" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Independent"/>
</span>
<a itemprop="sameAs" href="https://www.facebook.com/johnwickmovie/">Facebook</a>
</span>
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Recipe",
"name": "Fwied Wabbit",
"image": "http://3.bp.blogspot.com/-HaSlBKaJw0I/VKazwDcelRI/AAAAAAAAALs/YlKI80Oh3CM/s1600/bugs-bunny.gif",
"description": "A dewicious treat for hungwy huntews!",
"author": {
"@type": "Person",
"name": "Elmer Fudd"
},
"datePublished": "2017-11-04",
"prepTime": "PT20M",
"cookTime": "PT5M",
"totalTime": "PT25M",
"recipeCategory": "entree",
"recipeYield": "1",
"nutrition": {
"@type": "NutritionInformation",
"calories": "324 cal"
},
"recipeIngredient": [
"Bunny Wabbit",
"ACME Bawbecue Sauce"
],
"recipeInstructions": [
"Hunt the wabbit",
"Add sauce to the wabbit",
"Fwi it!",
"Enjoy"
],
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4",
"bestRating": "5",
"worstRating": "0",
"ratingCount": "5"
}
}
</script>
Tested in Google's Schema Markup Validator and made with Merkle's Schema Markup Generator
Passar informação ao "user agent"
hreflang
Links para o equivalente a uma certa página, mas noutra língua
By Miguel Costa
On meta information for web pages, with emphasis on it impact for social networks and search engines.