open_graph_reader 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitmodules +3 -0
- data/.rspec +2 -0
- data/.yardopts +1 -0
- data/lib/open_graph_reader.rb +83 -0
- data/lib/open_graph_reader/base.rb +57 -0
- data/lib/open_graph_reader/builder.rb +100 -0
- data/lib/open_graph_reader/definitions.rb +333 -0
- data/lib/open_graph_reader/fetcher.rb +82 -0
- data/lib/open_graph_reader/object.rb +95 -0
- data/lib/open_graph_reader/object/dsl.rb +130 -0
- data/lib/open_graph_reader/object/dsl/types.rb +71 -0
- data/lib/open_graph_reader/object/registry.rb +54 -0
- data/lib/open_graph_reader/parser.rb +85 -0
- data/lib/open_graph_reader/parser/graph.rb +136 -0
- data/lib/open_graph_reader/version.rb +4 -0
- data/spec/fixtures/examples/apple-touch-icon-precomposed.png +0 -0
- data/spec/fixtures/examples/apple-touch-icon.png +0 -0
- data/spec/fixtures/examples/article-offset.html +25 -0
- data/spec/fixtures/examples/article-utc.html +25 -0
- data/spec/fixtures/examples/article.html +25 -0
- data/spec/fixtures/examples/audio-array.html +27 -0
- data/spec/fixtures/examples/audio-url.html +25 -0
- data/spec/fixtures/examples/audio.html +24 -0
- data/spec/fixtures/examples/book-isbn10.html +27 -0
- data/spec/fixtures/examples/book.html +27 -0
- data/spec/fixtures/examples/canadian.html +16 -0
- data/spec/fixtures/examples/error.html +17 -0
- data/spec/fixtures/examples/errors/article-date.html +25 -0
- data/spec/fixtures/examples/errors/book-author.html +27 -0
- data/spec/fixtures/examples/errors/book.html +27 -0
- data/spec/fixtures/examples/errors/gender.html +20 -0
- data/spec/fixtures/examples/errors/geo.html +23 -0
- data/spec/fixtures/examples/errors/type.html +16 -0
- data/spec/fixtures/examples/errors/video-duration.html +42 -0
- data/spec/fixtures/examples/favicon.ico +0 -0
- data/spec/fixtures/examples/filters/xss-image.html +15 -0
- data/spec/fixtures/examples/image-array.html +26 -0
- data/spec/fixtures/examples/image-toosmall.html +24 -0
- data/spec/fixtures/examples/image-url.html +22 -0
- data/spec/fixtures/examples/image.html +21 -0
- data/spec/fixtures/examples/index.html +67 -0
- data/spec/fixtures/examples/media/audio/1khz.mp3 +0 -0
- data/spec/fixtures/examples/media/audio/250hz.mp3 +0 -0
- data/spec/fixtures/examples/media/images/1.png +0 -0
- data/spec/fixtures/examples/media/images/50.png +0 -0
- data/spec/fixtures/examples/media/images/75.png +0 -0
- data/spec/fixtures/examples/media/images/icon.png +0 -0
- data/spec/fixtures/examples/media/images/logo.png +0 -0
- data/spec/fixtures/examples/media/images/train.jpg +0 -0
- data/spec/fixtures/examples/media/video/train.flv +0 -0
- data/spec/fixtures/examples/media/video/train.mp4 +0 -0
- data/spec/fixtures/examples/media/video/train.webm +0 -0
- data/spec/fixtures/examples/min.html +14 -0
- data/spec/fixtures/examples/nomedia.html +20 -0
- data/spec/fixtures/examples/plain.html +10 -0
- data/spec/fixtures/examples/profile.html +25 -0
- data/spec/fixtures/examples/required.html +20 -0
- data/spec/fixtures/examples/robots.txt +4 -0
- data/spec/fixtures/examples/sitemap.xml +23 -0
- data/spec/fixtures/examples/video-array.html +36 -0
- data/spec/fixtures/examples/video-movie.html +42 -0
- data/spec/fixtures/examples/video.html +26 -0
- data/spec/integration/invalid_examples_spec.rb +69 -0
- data/spec/integration/valid_examples_spec.rb +76 -0
- data/spec/open_graph_reader_spec.rb +94 -0
- data/spec/spec_helper.rb +35 -0
- metadata +247 -0
@@ -0,0 +1,27 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head prefix="og: http://ogp.me/ns# book: http://ogp.me/ns/book#">
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Steve Jobs</title>
|
6
|
+
<meta property="og:title" content="Steve Jobs">
|
7
|
+
<meta property="og:site_name" content="Open Graph protocol examples">
|
8
|
+
<meta property="og:type" content="book">
|
9
|
+
<meta property="og:locale" content="en_US">
|
10
|
+
<link rel="canonical" href="http://examples.opengraphprotocol.us/errors/book.html">
|
11
|
+
<meta property="og:url" content="http://examples.opengraphprotocol.us/errors/book.html">
|
12
|
+
<meta property="og:image" content="http://examples.opengraphprotocol.us/media/images/50.png">
|
13
|
+
<meta property="og:image:secure_url" content="https://d72cgtgi6hvvl.cloudfront.net/media/images/50.png">
|
14
|
+
<meta property="og:image:width" content="50">
|
15
|
+
<meta property="og:image:height" content="50">
|
16
|
+
<meta property="og:image:type" content="image/png">
|
17
|
+
<meta property="book:author" content="http://examples.opengraphprotocol.us/profile.html">
|
18
|
+
<meta property="book:isbn" content="aBcDe12345">
|
19
|
+
<meta property="book:release_date" content="2011-10-24">
|
20
|
+
<meta property="book:tag" content="Steve Jobs">
|
21
|
+
<meta property="book:tag" content="Apple">
|
22
|
+
<meta property="book:tag" content="Pixar">
|
23
|
+
</head>
|
24
|
+
<body>
|
25
|
+
<p>Example of a <a href="http://ogp.me/#type_book">book</a> object an invalid <a href="http://en.wikipedia.org/wiki/International_Standard_Book_Number"><abbr title="International Standard Book Number">ISBN</abbr></a>.</p>
|
26
|
+
</body>
|
27
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head prefix="og: http://ogp.me/ns# profile: http://ogp.me/ns/profile#">
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Undefined gender type</title>
|
6
|
+
<meta property="og:type" content="profile">
|
7
|
+
<meta property="og:title" content="Undefined gender type">
|
8
|
+
<link rel="canonical" href="http://examples.opengraphprotocol.us/errors/gender.html">
|
9
|
+
<meta property="og:url" content="http://examples.opengraphprotocol.us/errors/gender.html">
|
10
|
+
<meta property="og:image" content="http://examples.opengraphprotocol.us/media/images/50.png">
|
11
|
+
<meta property="profile:first_name" content="Coilette">
|
12
|
+
<meta property="profile:last_name" content="Rodríguez">
|
13
|
+
<meta property="profile:gender" content="fembot">
|
14
|
+
<meta property="profile:username" content="bender">
|
15
|
+
</head>
|
16
|
+
<body>
|
17
|
+
<p>Open Graph protocol defines gender as either <kbd>male</kbd> or <kbd>female</kbd>. This document describes a <kbd>fembot</kbd>.</p>
|
18
|
+
<p>A parser might reject the gender or classify as "other" based on its internal gender mappings.</p>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head prefix="og: http://ogp.me/ns#">
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Open Graph protocol 1.0 location data</title>
|
6
|
+
<meta property="og:type" content="website">
|
7
|
+
<meta property="og:title" content="Open Graph protocol 1.0 location data">
|
8
|
+
<link rel="canonical" href="http://examples.opengraphprotocol.us/errors/geo.html">
|
9
|
+
<meta property="og:url" content="http://examples.opengraphprotocol.us/errors/geo.html">
|
10
|
+
<meta property="og:image" content="http://examples.opengraphprotocol.us/media/images/50.png">
|
11
|
+
<meta property="og:street-address" content="1 Hacker Way">
|
12
|
+
<meta property="og:locality" content="Menlo Park">
|
13
|
+
<meta property="og:region" content="CA">
|
14
|
+
<meta property="og:postal-code" content="94025">
|
15
|
+
<meta property="og:country-name" content="USA">
|
16
|
+
<meta property="og:latitude" content="37.48299">
|
17
|
+
<meta property="og:longitude" content="-122.15009">
|
18
|
+
</head>
|
19
|
+
<body>
|
20
|
+
<p>This page includes elements used in the original version of Open Graph protocol to describe a place and its location on the surface of Earth.</p>
|
21
|
+
<p>A parser implementing Open Graph protocol 1.1 and its new element set might ignore such elements.</p>
|
22
|
+
</body>
|
23
|
+
</html>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head prefix="og: http://ogp.me/ns#">
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Undefined global type</title>
|
6
|
+
<meta property="og:type" content="fubar">
|
7
|
+
<meta property="og:title" content="Undefined global type">
|
8
|
+
<link rel="canonical" href="http://examples.opengraphprotocol.us/errors/type.html">
|
9
|
+
<meta property="og:url" content="http://examples.opengraphprotocol.us/errors/type.html">
|
10
|
+
<meta property="og:image" content="http://examples.opengraphprotocol.us/media/images/50.png">
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
<p>A declared Open Graph protocol global type not declared in the original Open Graph protocol or the 2011 redefinition.</p>
|
14
|
+
<p>A parser might reject the type and instead map as "website."</p>
|
15
|
+
</body>
|
16
|
+
</html>
|
@@ -0,0 +1,42 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head prefix="og: http://ogp.me/ns# video: http://ogp.me/ns/video#">
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Arrival of a Train at La Ciotat</title>
|
6
|
+
<meta property="og:title" content="Arrival of a Train at La Ciotat">
|
7
|
+
<meta property="og:site_name" content="Open Graph protocol examples">
|
8
|
+
<meta property="og:type" content="video.movie">
|
9
|
+
<meta property="og:locale" content="en_US">
|
10
|
+
<link rel="canonical" href="http://examples.opengraphprotocol.us/errors/video-duration.html">
|
11
|
+
<meta property="og:url" content="http://examples.opengraphprotocol.us/errors/video-duration.html">
|
12
|
+
<meta property="og:image" content="http://examples.opengraphprotocol.us/media/images/50.png">
|
13
|
+
<meta property="og:image:secure_url" content="https://d72cgtgi6hvvl.cloudfront.net/media/images/50.png">
|
14
|
+
<meta property="og:image:width" content="50">
|
15
|
+
<meta property="og:image:height" content="50">
|
16
|
+
<meta property="og:image:type" content="image/png">
|
17
|
+
<meta property="og:video" content="http://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf?src=http%3A%2F%2Fexamples.opengraphprotocol.us%2Fmedia%2Fvideo%2Ftrain.mp4">
|
18
|
+
<meta property="og:video:secure_url" content="https://fpdownload.adobe.com/strobe/FlashMediaPlayback.swf?src=https%3A%2F%2Fd72cgtgi6hvvl.cloudfront.net%2Fmedia%2Fvideo%2Ftrain.mp4">
|
19
|
+
<meta property="og:video:type" content="application/x-shockwave-flash">
|
20
|
+
<meta property="og:video:width" content="472">
|
21
|
+
<meta property="og:video:height" content="296">
|
22
|
+
<meta property="og:video" content="http://examples.opengraphprotocol.us/media/video/train.mp4">
|
23
|
+
<meta property="og:video:secure_url" content="https://d72cgtgi6hvvl.cloudfront.net/media/video/train.mp4">
|
24
|
+
<meta property="og:video:type" content="video/mp4">
|
25
|
+
<meta property="og:video:width" content="472">
|
26
|
+
<meta property="og:video:height" content="296">
|
27
|
+
<meta property="og:video" content="http://examples.opengraphprotocol.us/media/video/train.webm">
|
28
|
+
<meta property="og:video:secure_url" content="https://d72cgtgi6hvvl.cloudfront.net/media/video/train.webm">
|
29
|
+
<meta property="og:video:type" content="video/webm">
|
30
|
+
<meta property="og:video:width" content="480">
|
31
|
+
<meta property="og:video:height" content="320">
|
32
|
+
<meta property="video:release_date" content="1895-12-28">
|
33
|
+
<meta property="video:director" content="http://examples.opengraphprotocol.us/profile.html">
|
34
|
+
<meta property="video:duration" content="49.41">
|
35
|
+
<meta property="video:tag" content="La Ciotat">
|
36
|
+
<meta property="video:tag" content="train">
|
37
|
+
</head>
|
38
|
+
<body>
|
39
|
+
<p>A <a href="http://ogp.me/#type_video.movie">video.movie</a> object with fractional seconds.</p>
|
40
|
+
<p>An indexer might reject the value or round up.</p>
|
41
|
+
</body>
|
42
|
+
</html>
|
Binary file
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head prefix="og: http://ogp.me/ns#">
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Cross site scripting image attempt</title>
|
6
|
+
<meta property="og:title" content="Cross site scripting image attempt">
|
7
|
+
<link rel="canonical" href="http://examples.opengraphprotocol.us/filters/xss-image.html">
|
8
|
+
<meta property="og:url" content="http://examples.opengraphprotocol.us/filters/xss-image.html">
|
9
|
+
<meta property="og:image" content="javascript:alert('XSS')">
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
<p>An attempt to introduce JavaScript in an og:image, which might be displayed as an <img src> on a consuming website.</p>
|
13
|
+
<p>Images are defined as http and https protocols only; javascript:* should not be an accepted value.</p>
|
14
|
+
</body>
|
15
|
+
</html>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head prefix="og: http://ogp.me/ns#">
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Two structured image properties</title>
|
6
|
+
<meta property="og:title" content="Two structured image properties">
|
7
|
+
<meta property="og:site_name" content="Open Graph protocol examples">
|
8
|
+
<meta property="og:type" content="website">
|
9
|
+
<meta property="og:locale" content="en_US">
|
10
|
+
<link rel="canonical" href="http://examples.opengraphprotocol.us/image-array.html">
|
11
|
+
<meta property="og:url" content="http://examples.opengraphprotocol.us/image-array.html">
|
12
|
+
<meta property="og:image" content="http://examples.opengraphprotocol.us/media/images/75.png">
|
13
|
+
<meta property="og:image:secure_url" content="https://d72cgtgi6hvvl.cloudfront.net/media/images/75.png">
|
14
|
+
<meta property="og:image:width" content="75">
|
15
|
+
<meta property="og:image:height" content="75">
|
16
|
+
<meta property="og:image:type" content="image/png">
|
17
|
+
<meta property="og:image" content="http://examples.opengraphprotocol.us/media/images/50.png">
|
18
|
+
<meta property="og:image:secure_url" content="https://d72cgtgi6hvvl.cloudfront.net/media/images/50.png">
|
19
|
+
<meta property="og:image:width" content="50">
|
20
|
+
<meta property="og:image:height" content="50">
|
21
|
+
<meta property="og:image:type" content="image/png">
|
22
|
+
</head>
|
23
|
+
<body>
|
24
|
+
<p>Two images declared as an <a href="http://ogp.me/#array">array</a>.</p>
|
25
|
+
</body>
|
26
|
+
</html>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head prefix="og: http://ogp.me/ns#">
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Structured image too small</title>
|
6
|
+
<meta property="og:title" content="Structured image too small">
|
7
|
+
<meta property="og:site_name" content="Open Graph protocol examples">
|
8
|
+
<meta name="description" content="Will an indexer accept a 1x1 transparent PNG?">
|
9
|
+
<meta property="og:description" content="Will an indexer accept a 1x1 transparent PNG?">
|
10
|
+
<meta property="og:type" content="website">
|
11
|
+
<meta property="og:locale" content="en_US">
|
12
|
+
<link rel="canonical" href="http://examples.opengraphprotocol.us/image-toosmall.html">
|
13
|
+
<meta property="og:url" content="http://examples.opengraphprotocol.us/image-toosmall.html">
|
14
|
+
<meta property="og:image" content="http://examples.opengraphprotocol.us/media/images/1.png">
|
15
|
+
<meta property="og:image:secure_url" content="https://d72cgtgi6hvvl.cloudfront.net/media/images/1.png">
|
16
|
+
<meta property="og:image:width" content="1">
|
17
|
+
<meta property="og:image:height" content="1">
|
18
|
+
<meta property="og:image:type" content="image/png">
|
19
|
+
</head>
|
20
|
+
<body>
|
21
|
+
<p>Will an indexer accept a 1x1 transparent PNG?</p>
|
22
|
+
<p>Facebook <a href="https://developers.facebook.com/docs/opengraph/#started">requires</a> an og:image to be "at least 50px by 50px and have a maximum aspect ratio of 3:1."</p>
|
23
|
+
</body>
|
24
|
+
</html>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head prefix="og: http://ogp.me/ns#">
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Full structured image property</title>
|
6
|
+
<meta property="og:title" content="Full structured image property">
|
7
|
+
<meta property="og:site_name" content="Open Graph protocol examples">
|
8
|
+
<meta property="og:type" content="website">
|
9
|
+
<meta property="og:locale" content="en_US">
|
10
|
+
<link rel="canonical" href="http://examples.opengraphprotocol.us/image-url.html">
|
11
|
+
<meta property="og:url" content="http://examples.opengraphprotocol.us/image-url.html">
|
12
|
+
<meta property="og:image:url" content="http://examples.opengraphprotocol.us/media/images/50.png">
|
13
|
+
<meta property="og:image:secure_url" content="https://d72cgtgi6hvvl.cloudfront.net/media/images/50.png">
|
14
|
+
<meta property="og:image:width" content="50">
|
15
|
+
<meta property="og:image:height" content="50">
|
16
|
+
<meta property="og:image:type" content="image/png">
|
17
|
+
</head>
|
18
|
+
<body>
|
19
|
+
<p>Example of basic properties with a <a href="http://ogp.me/#structured">structured</a> image including og:image:url.</p>
|
20
|
+
<p>Compare to <a href="/image.html">og:image alias</a> for parser support of og:image:url vs. og:image.</p>
|
21
|
+
</body>
|
22
|
+
</html>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head prefix="og: http://ogp.me/ns#">
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Structured image property</title>
|
6
|
+
<meta property="og:title" content="Structured image property">
|
7
|
+
<meta property="og:site_name" content="Open Graph protocol examples">
|
8
|
+
<meta property="og:type" content="website">
|
9
|
+
<meta property="og:locale" content="en_US">
|
10
|
+
<link rel="canonical" href="http://examples.opengraphprotocol.us/image.html">
|
11
|
+
<meta property="og:url" content="http://examples.opengraphprotocol.us/image.html">
|
12
|
+
<meta property="og:image" content="http://examples.opengraphprotocol.us/media/images/50.png">
|
13
|
+
<meta property="og:image:secure_url" content="https://d72cgtgi6hvvl.cloudfront.net/media/images/50.png">
|
14
|
+
<meta property="og:image:width" content="50">
|
15
|
+
<meta property="og:image:height" content="50">
|
16
|
+
<meta property="og:image:type" content="image/png">
|
17
|
+
</head>
|
18
|
+
<body>
|
19
|
+
<p>Example of basic properties with a <a href="http://ogp.me/#structured">structured</a> image.</p>
|
20
|
+
</body>
|
21
|
+
</html>
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head prefix="og: http://ogp.me/ns#">
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
6
|
+
<title>Open Graph protocol examples</title>
|
7
|
+
<meta name="description" content="Example HTML documents marked up with Open Graph protocol.">
|
8
|
+
<meta property="og:description" content="Example HTML documents marked up with Open Graph protocol.">
|
9
|
+
<meta property="og:type" content="website">
|
10
|
+
<meta property="og:locale" content="en_US">
|
11
|
+
<meta property="og:title" content="Open Graph protocol examples">
|
12
|
+
<meta property="og:site_name" content="Open Graph protocol examples">
|
13
|
+
<meta property="og:determiner" content="the">
|
14
|
+
<link rel="canonical" href="http://examples.opengraphprotocol.us/">
|
15
|
+
<meta property="og:url" content="http://examples.opengraphprotocol.us/">
|
16
|
+
<meta property="og:image" content="http://examples.opengraphprotocol.us/media/images/logo.png">
|
17
|
+
<meta property="og:image:secure_url" content="https://d72cgtgi6hvvl.cloudfront.net/media/images/logo.png">
|
18
|
+
<meta property="og:image:type" content="image/png">
|
19
|
+
<meta property="og:image:width" content="300">
|
20
|
+
<meta property="og:image:height" content="300">
|
21
|
+
<link rel="author" href="http://www.niallkennedy.com/">
|
22
|
+
<link rel="icon shortcut" type="image/vnd.microsoft.icon" href="/favicon.ico" sizes="16x16">
|
23
|
+
<link rel="icon" type="image/png" href="/media/images/icon.png" sizes="16x16">
|
24
|
+
</head>
|
25
|
+
<body itemscope itemtype="http://schema.org/WebPage">
|
26
|
+
<header><h1 itemprop="name">Open Graph protocol examples</h1></header>
|
27
|
+
<div role="main">
|
28
|
+
<p itemprop="description">Examples of Open Graph protocol markup.</p>
|
29
|
+
|
30
|
+
<section id="standard">
|
31
|
+
<header><h2>Open Graph namespace</h2></header>
|
32
|
+
<ul>
|
33
|
+
<li><a href="/min.html">Missing required properties</a></li>
|
34
|
+
<li><a href="/required.html">Required properties</a></li>
|
35
|
+
<li><a href="/nomedia.html">Most properties, no media</a></li>
|
36
|
+
<li><a href="/canadian.html">Canadian (en_CA)</a></li>
|
37
|
+
<li>Images<ul>
|
38
|
+
<li><a href="/image.html">Structured image</a></li>
|
39
|
+
<li><a href="/image-url.html">Structured image w/ image:url</a></li>
|
40
|
+
<li><a href="/image-array.html">Structured image array</a></li>
|
41
|
+
<li><a href="/image-toosmall.html">One-pixel structured image</a></li></ul></li>
|
42
|
+
<li>Audio<ul>
|
43
|
+
<li><a href="/audio.html">Structured audio</a></li>
|
44
|
+
<li><a href="/audio-url.html">Structured audio w/ audio:url</a></li>
|
45
|
+
<li><a href="/audio-array.html">Structured audio array</a></li></ul></li>
|
46
|
+
<li>Video<ul>
|
47
|
+
<li><a href="/video.html">Structured video</a></li>
|
48
|
+
<li><a href="/video-array.html">Structured video array</a></li></ul></li>
|
49
|
+
</ul>
|
50
|
+
</section>
|
51
|
+
|
52
|
+
<section id="objects">
|
53
|
+
<header><h2>Global object namespace</h2></header>
|
54
|
+
<ul>
|
55
|
+
<li><a href="/article.html">Article</a></li>
|
56
|
+
<li><a href="/article-utc.html">Article w/ UTC datetime</a></li>
|
57
|
+
<li><a href="/article-offset.html">Article w/ UTC offset</a></li>
|
58
|
+
<li><a href="/book.html">Book</a></li>
|
59
|
+
<li><a href="/book-isbn10.html">Book w/ ISBN-10</a></li>
|
60
|
+
<li><a href="/profile.html">Profile</a></li>
|
61
|
+
<li><a href="/video-movie.html">Video movie</a></li>
|
62
|
+
</ul>
|
63
|
+
</section>
|
64
|
+
</div>
|
65
|
+
<footer style="text-align:center">by <a rel="author" href="http://www.niallkennedy.com/">Niall Kennedy</a></footer>
|
66
|
+
</body>
|
67
|
+
</html>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Minimal HTML</title>
|
6
|
+
<meta property="og:site_name" content="Open Graph protocol examples">
|
7
|
+
<meta property="og:description" content="Content not on page">
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<img alt="logo" src="http://examples.opengraphprotocol.us/media/images/logo.png" width="300" height="300">
|
11
|
+
<p>An example of an HTML document lacking <a href="http://ogp.me/#metadata">required</a> properties.</p>
|
12
|
+
<p>Contains optional properties and HTML fallback content.</p>
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head prefix="og: http://ogp.me/ns#">
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>No media properties</title>
|
6
|
+
<meta property="og:title" content="No media properties">
|
7
|
+
<meta property="og:site_name" content="Open Graph protocol examples">
|
8
|
+
<meta name="description" content="Required and optional properties without associated media.">
|
9
|
+
<meta property="og:description" content="Required and optional properties without associated media.">
|
10
|
+
<meta property="og:type" content="website">
|
11
|
+
<meta property="og:locale" content="en_US">
|
12
|
+
<meta property="og:determiner" content="the">
|
13
|
+
<link rel="canonical" href="http://examples.opengraphprotocol.us/nomedia.html">
|
14
|
+
<meta property="og:url" content="http://examples.opengraphprotocol.us/nomedia.html">
|
15
|
+
<meta property="og:image" content="http://examples.opengraphprotocol.us/media/images/50.png">
|
16
|
+
</head>
|
17
|
+
<body>
|
18
|
+
<p>All <a href="http://ogp.me/#metadata">required</a> and <a href="http://ogp.me/#optional">optional</a> properties without associated media.</p>
|
19
|
+
</body>
|
20
|
+
</html>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head prefix="og: http://ogp.me/ns# profile: http://ogp.me/ns/profile#">
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>John Doe profile page</title>
|
6
|
+
<meta property="og:title" content="John Doe profile page">
|
7
|
+
<meta property="og:site_name" content="Open Graph protocol examples">
|
8
|
+
<meta property="og:type" content="profile">
|
9
|
+
<meta property="og:locale" content="en_US">
|
10
|
+
<link rel="canonical" href="http://examples.opengraphprotocol.us/profile.html">
|
11
|
+
<meta property="og:url" content="http://examples.opengraphprotocol.us/profile.html">
|
12
|
+
<meta property="og:image" content="http://examples.opengraphprotocol.us/media/images/50.png">
|
13
|
+
<meta property="og:image:secure_url" content="https://d72cgtgi6hvvl.cloudfront.net/media/images/50.png">
|
14
|
+
<meta property="og:image:width" content="50">
|
15
|
+
<meta property="og:image:height" content="50">
|
16
|
+
<meta property="og:image:type" content="image/png">
|
17
|
+
<meta property="profile:first_name" content="John">
|
18
|
+
<meta property="profile:last_name" content="Doe">
|
19
|
+
<meta property="profile:gender" content="male">
|
20
|
+
<meta property="profile:username" content="johndoe">
|
21
|
+
</head>
|
22
|
+
<body>
|
23
|
+
<p>A person's <a href="http://ogp.me/#type_profile">profile</a> page.</p>
|
24
|
+
</body>
|
25
|
+
</html>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head prefix="og: http://ogp.me/ns#">
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Minimum required properties</title>
|
6
|
+
<meta property="og:title" content="Minimum required properties">
|
7
|
+
<link rel="canonical" href="http://examples.opengraphprotocol.us/required.html">
|
8
|
+
<meta property="og:url" content="http://examples.opengraphprotocol.us/required.html">
|
9
|
+
<meta property="og:image" content="http://examples.opengraphprotocol.us/media/images/50.png">
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
<p>Minimum <a href="http://ogp.me/#metadata">required</a> properties:</p>
|
13
|
+
<ul>
|
14
|
+
<li>title</li>
|
15
|
+
<li>image</li>
|
16
|
+
<li>url</li>
|
17
|
+
</ul>
|
18
|
+
<p>The type property is also required but if absent the page will be treated as type website.</p>
|
19
|
+
</body>
|
20
|
+
</html>
|