Open Graph Protocol

The Open Graph Protocol (hereafter just OGP) enables a web site to display rich content in a social graph. This is a very simple but powerful concept, one which sites like Facebook have pioneered and leveraged extensively.

In order for a web site to become part of a social graph, you must add a set of meta data to the page. The protocol implemented relies on RDFa. RDF is the Resource Description Framework, and it is basically a language for modeling different optimized for sharing and interchange of information. RDFa simply adds a set of extra attributes to the XHTML standard in order to support the extra meta needed for OGP.

Basic Metadata

  • og:title : The title of your object as it should appear within the graph.
  • og:type : The type of your object, e.g., “movie”. Depending on the type you specify, other properties may also be required.
  • og:image : An image URL which should represent your object within the graph.
  • og:url : The canonical URL of your object that will be used as its permanent ID in the graph.

With this basic information, your web site can be mapped in a social graph. In addition, there are other types of meta you can add including: location, audio, video, etc.

  • og:latitude – e.g., “37.416343″.
  • og:longitude – e.g., “-122.153013″.

If you wish to specify a human readable address, include the following five properties:

  • og:street-address – e.g., “1601 S California Ave”
  • og:locality – e.g, “Palo Alto”
  • og:region – e.g., “CA”
  • og:postal-code e.g., “94304″
  • og:country-name – e.g., “USA”

After you add all of the meta data of your choice, you can visit: http://www.opengraph.in/ and see how your site was parsed. Go ahead and try it with this site!

Resources:

1. http://ogp.me/
2. http://www.opengraph.in/

Stay Tuned! visit http://reflectivethought.net

Leave a Comment