O'Reilly logo

Programming Social Applications by Jonathan LeBlanc

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How the Open Graph Protocol Works

The Open Graph protocol uses <meta> tag markup to deliver a comprehensive view of a web entity within a user’s social graph. These <meta> tags provide data about what is being described on a page or web source, such as a business, movie, actor, or sports team.

Besides the type of information that describes what is being displayed on the page, you can also include geographic information and contact details.

The Open Graph ecosystem comprises two main elements:

An Open Graph producer

This is the site that includes <meta> tag information about the entities being described.

An Open Graph consumer

This is a developer or site that consumes that <meta> tag information placed on a site—for example, the Facebook Like button integration.

These are the basics of the Open Graph protocol. The web application, or consumer, makes a request to the website for information about the site. The site, or producer, will respond with the metadata about itself. This process is depicted in Figure 10-1.

Open Graph protocol request/response workflow

Figure 10-1. Open Graph protocol request/response workflow

Next, we’ll explore how to work with and implement the Open Graph protocol.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required